Skip to content
Latchkey

pnpm "ERR_PNPM_FETCH" / registry request failed in CI

pnpm made an HTTP request to the configured registry and it did not return a usable response: a 404 for a missing or private package, a 5xx from the registry, or a connection reset. The error names the URL and status.

What this error means

pnpm install fails with "ERR_PNPM_FETCH_404 GET https://registry.npmjs.org/... : Not Found" or "request to ... failed, reason: ..." for one or more packages.

pnpm
ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@acme%2futils: Not Found - 404

This error happened while installing the dependencies of @acme/web

Common causes

A private package on the public registry (404)

A scoped internal package is requested from registry.npmjs.org, which has no such package, so pnpm gets a 404.

Transient registry 5xx or connection drop

A momentary registry outage or a reset connection returns a 5xx or a fetch error that a retry usually clears.

How to fix it

Point the scope at the right registry

For a private scoped package, configure the scoped registry and token so pnpm fetches from where it actually lives.

.npmrc
@acme:registry=https://npm.internal.example.com/
//npm.internal.example.com/:_authToken=${NPM_TOKEN}

Retry and tune fetch settings for transient failures

For 5xx or connection resets, raise fetch retries and timeouts so a blip does not fail the job.

.npmrc
fetch-retries=5
fetch-retry-maxtimeout=120000

How to prevent it

  • Configure scoped registries for private packages so requests hit the right host.
  • Set fetch-retries generously for flaky networks.
  • Cache the pnpm store so most content is served locally, not fetched.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →