How to fix npm ERR! code E404 npm ERR! 404 Not Found - GET http://localhost:4873/package in npm
This error occurs when npm cannot find a package in your local Verdaccio registry, usually due to missing uplinks configuration, incorrect registry settings, or authentication issues. It prevents developers from installing dependencies through their private registry.
Quick fix
Fixes E404
curl http://localhost:4873/- Verify Verdaccio is running and accessible
- Configure npm to use the Verdaccio registry
- Check and fix uplinks configuration
- Clear npm cache and retry install
curl http://localhost:4873/npm ERR! code E404npm ERR! 404 Not Found - GET http://localhost:4873/package
What this error means
Verdaccio (a lightweight npm private registry) is returning a 404 Not Found response when npm tries to fetch a package from http://localhost:4873/. This typically means either the package hasn't been published to Verdaccio, Verdaccio isn't configured to proxy requests to npmjs.org for packages it doesn't have locally, or npm is pointed to the wrong registry.
Typical symptoms
- npm install fails with 'npm ERR! code E404' and 'GET http://localhost:4873/package'
- Package is visible in the Verdaccio web UI but still returns 404 when installing
- Dependencies show '404 Not Found - no such package available'
- npm ERR! 404 error persists even after publishing the package
- Dependency installation fails while direct package installs work
Common causes
- Uplinks configuration missing in config.yaml - Verdaccio can't proxy to npmjs.org
- npm is not configured to use the Verdaccio registry
- Package was never published to Verdaccio or publish failed
- Missing 'proxy: npmjs' directive in the packages section of config.yaml
- Authentication token expired or user not logged in to Verdaccio
- Verdaccio server is not running or not accessible at localhost:4873
How to fix "npm ERR! code E404 npm ERR! 404 Not Found - GET http://localhost:4873/package"
Confirm the Verdaccio server is active:
curl http://localhost:4873/If connection refused, start Verdaccio:
verdaccioSet npm to use your local Verdaccio registry:
npm set registry http://localhost:4873/Or create .npmrc file in your project:
registry=http://localhost:4873/Edit your Verdaccio config file (~/.config/verdaccio/config.yaml):
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
access: $authenticated
publish: $authenticated
proxy: npmjs
'**':
proxy: npmjsThe key is proxy: npmjs - this tells Verdaccio to forward requests to npmjs.org for packages it doesn't have locally.
After configuration changes, clear npm's cache:
npm cache clean --force
npm install <package-name>If the package is private, authenticate:
npm login --registry http://localhost:4873/Check if the package exists in Verdaccio storage:
curl http://localhost:4873/<package-name>
ls ~/.local/share/verdaccio/storage/If missing, publish it:
npm publish --registry http://localhost:4873/Advanced notes
Verdaccio operates as a proxy and cache layer. When configured properly, it maintains local copies of packages while proxying requests to upstream registries for packages not stored locally. The uplinks configuration is critical—without proper proxy settings, Verdaccio acts as a pure local registry with no fallback. For Docker deployments, ensure the listen address is 0.0.0.0:4873 instead of 127.0.0.1:4873.
Frequently asked questions
- What does "E404" mean?
- Verdaccio (a lightweight npm private registry) is returning a 404 Not Found response when npm tries to fetch a package from http://localhost:4873/. org for packages it doesn't have locally, or npm is pointed to the wrong registry.
- How do I fix "E404"?
- This error occurs when npm cannot find a package in your local Verdaccio registry, usually due to missing uplinks configuration, incorrect registry settings, or authentication issues. It prevents developers from installing dependencies through their private registry.
- What causes "E404"?
- Uplinks configuration missing in config.yaml - Verdaccio can't proxy to npmjs.org npm is not configured to use the Verdaccio registry Package was never published to Verdaccio or publish failed
- Is the "E404" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚npm Official Documentation
- 📖Verdaccio: A lightweight private npm proxy(Official Docs)
- 🐙Verdaccio GitHub Repository(GitHub)
- 💬Stack Overflow: Verdaccio Questions(Stack Overflow)