npm Registry 429 Too Many Requests in CI - Fix Rate Limiting
A 429 means the registry is throttling your requests. On shared CI IPs, unauthenticated high-volume installs hit rate limits, and the registry asks you to back off.
What this error means
npm install fails with 429 Too Many Requests from the registry, often on a busy runner pool. Retrying immediately can hit the same limit; backing off or authenticating clears it.
npm
npm ERR! code E429
npm ERR! 429 Too Many Requests - GET https://registry.npmjs.org/react
npm ERR! Retry-After: 60Common causes
Unauthenticated installs from shared IPs
Many runners sharing an egress IP and pulling anonymously exceed the per-IP rate limit.
No caching, multiplying registry calls
Every cold install re-fetches everything, inflating request volume against the limit.
How to fix it
Authenticate and back off
- Authenticate to the registry to raise the rate limit.
- Honor Retry-After by raising fetch retry timeouts.
Terminal
npm config set fetch-retries 5
npm config set fetch-retry-maxtimeout 120000
npm ciCache and mirror
- Cache ~/.npm so most installs avoid the registry.
- Use a private mirror to absorb high request volume.
How to prevent it
- Authenticate, cache ~/.npm, and front the registry with a mirror. Latchkey managed runners cache the npm registry and auto-retry transient 429 responses with backoff, so throttling rarely fails a job.
Related guides
Docker "toomanyrequests: rate limit exceeded" - Fix Docker Hub Pull LimitsFix Docker Hub "toomanyrequests: You have reached your pull rate limit" in CI by authenticating, caching imag…
npm ETIMEDOUT Registry Request Failed in CI - Fix Network TimeoutsFix npm ETIMEDOUT and network-request-failed errors in CI with fetch retries, caching, and a mirror, since mo…
npm ECONNRESET in CI - Fix Dropped Registry ConnectionsFix npm ECONNRESET errors in CI when the registry connection is reset mid-download, using retries, caching, a…