npm E404 Not Found in CI - Fix Missing Package Errors
E404 means the registry has no package, version, or scope matching your request. It is a lookup failure, so retrying the same request will keep returning 404.
What this error means
npm install fails with code E404 and 404 Not Found for a specific package. The name may be misspelled, the version may not exist, or a scoped package may be resolved against the wrong registry.
npm
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@acme%2fui
npm ERR! 404 '@acme/ui@^2.0.0' is not in this registry.Common causes
A misspelled or unpublished package or version
The name or requested version does not exist on the registry being queried.
A scoped package mapped to the wrong registry
A private scope is queried against the public registry, which has never heard of it, returning 404.
How to fix it
Verify the name and version
- Check the package exists with npm view <pkg>.
- Correct the name or version range in package.json.
Terminal
npm view @acme/ui versionsPoint the scope at the right registry
- Add a scope-to-registry mapping in .npmrc for private scopes.
- Reinstall so npm queries the correct registry.
.npmrc
@acme:registry=https://registry.acme.internal/How to prevent it
- Pin versions that exist, configure scoped-registry mappings, and validate new dependency names before merge so a clean CI install never hits a 404.
Related guides
Scoped Package 404 (Missing Registry Mapping) in CI - Fix Scope ResolutionFix scoped package 404 errors in CI by mapping the scope to its private registry in .npmrc, since the default…
npm "404 Not Found" for a Private Package - Fix in CIFix npm "404 Not Found - GET https://registry…/@scope/pkg" in CI for a private package - wrong registry, miss…
pnpm ERR_PNPM_NO_MATCHING_VERSION in CI - Fix Unresolvable Version RangeFix ERR_PNPM_NO_MATCHING_VERSION in CI when a requested version range matches nothing in the registry, by cor…