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 ERR! code ENOAUDIT npm ERR! Audit endpoint not supported
How to fix "npm ERR! code ENOAUDIT - Audit endpoint not supported"
npm ERR! code EBADDEVENGINES npm ERR! devEngines.runtime incompatible with current node version
How to fix "npm ERR! code EBADDEVENGINES - devEngines.runtime incompatible with current node version"
npm ERR! code ETOOMANYARGS npm ERR! Too many arguments
How to fix "npm ERR! code ETOOMANYARGS - Too many arguments"
npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name: tag names cannot contain spaces
How to fix "npm ERR! code EINVALIDTAGNAME - tag names cannot contain spaces"
npm ERR! code E400 npm ERR! 400 Bad Request
How to fix "npm ERR! code E400 - 400 Bad Request" error