npm ERR! code E404 — 404 Not Found: package@version is not in this registry
npm asked the registry for a package (or version) that doesn’t exist there — a typo, a private/scoped package without auth, or the wrong registry.
Meaning
Private packages return 404 (not 401) when you’re not authenticated, so a 404 on @company/... usually means missing registry config or token, not a missing package.
Common causes
- Typo in the package name
- Scoped private package without
.npmrcregistry/token for that scope - Package unpublished or version doesn’t exist
- Custom registry (Verdaccio/Artifactory) not proxying npmjs
- GitHub Packages scope not mapped to npm.pkg.github.com
⚡ Quick fix
- Check the name:
npm view <package> versions - Configure the scope registry and token in
.npmrc - Check
npm config get registry
Detailed fix by platform
npm
- .npmrc for a private scope (GitHub Packages example):ini
@mycompany:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=${NPM_TOKEN}
How to diagnose
- Name — Exact package name and version?
- Registry — Which registry is queried for that scope?
- Auth — Token present for private scopes?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026