E404 📦 npm

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.

Seen on: npm Node.js

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 .npmrc registry/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

  1. Check the name: npm view <package> versions
  2. Configure the scope registry and token in .npmrc
  3. Check npm config get registry

Detailed fix by platform

npm

  1. .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

  1. Name — Exact package name and version?
  2. Registry — Which registry is queried for that scope?
  3. 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.