How to fix npm ERR! code E404 npm ERR! 404 Not Found - GET http://localhost:4873/package in npm

npmINTERMEDIATEMEDIUMUpdated Dec 3, 2025· 83 views

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/
  1. Verify Verdaccio is running and accessible
  2. Configure npm to use the Verdaccio registry
  3. Check and fix uplinks configuration
  4. Clear npm cache and retry install
npm — error
curl http://localhost:4873/
npm ERR! code E404
npm 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

  1. Uplinks configuration missing in config.yaml - Verdaccio can't proxy to npmjs.org
  2. npm is not configured to use the Verdaccio registry
  3. Package was never published to Verdaccio or publish failed
  4. Missing 'proxy: npmjs' directive in the packages section of config.yaml
  5. Authentication token expired or user not logged in to Verdaccio
  6. 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"

1Verify Verdaccio is running and accessible

Confirm the Verdaccio server is active:

bash
curl http://localhost:4873/

If connection refused, start Verdaccio:

bash
verdaccio
2Configure npm to use the Verdaccio registry

Set npm to use your local Verdaccio registry:

bash
npm set registry http://localhost:4873/

Or create .npmrc file in your project:

bash
registry=http://localhost:4873/
3Check and fix uplinks configuration

Edit your Verdaccio config file (~/.config/verdaccio/config.yaml):

yaml
uplinks:
  npmjs:
    url: https://registry.npmjs.org/

packages:
  '@*/*':
    access: $authenticated
    publish: $authenticated
    proxy: npmjs
  '**':
    proxy: npmjs

The key is proxy: npmjs - this tells Verdaccio to forward requests to npmjs.org for packages it doesn't have locally.

4Clear npm cache and retry install

After configuration changes, clear npm's cache:

bash
npm cache clean --force
npm install <package-name>
5Authenticate with Verdaccio registry

If the package is private, authenticate:

bash
npm login --registry http://localhost:4873/
6Verify package was published successfully

Check if the package exists in Verdaccio storage:

bash
curl http://localhost:4873/<package-name>
ls ~/.local/share/verdaccio/storage/

If missing, publish it:

bash
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