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.
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.
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/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.
npm notice access token expired or revoked. Please try logging in again.
Token has expired - npm authentication failure
npm ERR! code EAI_AGAIN
How to fix "EAI_AGAIN" in npm
npm error code E403 npm error 403 Forbidden - PUT https://registry.npmjs.org/<package>
How to fix 'E403 Forbidden' error in npm
npm ERR! code EUSAGE npm ERR! Usage error
How to fix "npm ERR! code EUSAGE" in Node.js projects
npm ERR! code E401 npm ERR! 401 Unauthorized
How to fix "E401 Unauthorized" in npm