Home·Error messages

npm · npm

The message

npm ERR! 404 Not Found - GET https://registry.npmjs.org/@acme/ui - Not found

What it means

The registry has no package by that name — a 404 is an answer about the name, not about your network or your credentials. It happens on a typo, on a package that was unpublished, or on a private scope you are not logged in to. A private package looks exactly like a nonexistent one to someone without access, which is why all three collapse into this single line. npm view @acme/ui version confirms whether the name exists publicly, and for a private scope check that .npmrc has the registry and token for that scope. Both checks only read.

The fix

npm view @acme/ui version
Printed by
npm
npm
20

With npm the cause sits in the first code XXXX line rather than the last six npm ERR! lines, and when the failure comes from the dependency tree or a native build instead of your own code, deleting node_modules and installing again clears about half of them.

Reading an error message

  • Read from the first line down. The lower you go the more it is about the tool’s internals; the cause is usually at the top.
  • If there is a file and a line number, start there — not the top stack frame, but the topmost line that names a file you wrote.
  • Search the message verbatim, but strip your own paths and variable names first; those are what stop the search from matching.
  • The same condition is worded differently across tool versions. If results look wrong, add the version number to the query.
  • Before pasting a fix, check what it throws away. Some of these cannot be undone.

Common questions

Q. What does “npm ERR! 404 Not Found - GET https://registry.npmjs.org/@acme/ui - Not found” mean?

The registry has no package by that name — a 404 is an answer about the name, not about your network or your credentials. It happens on a typo, on a package that was unpublished, or on a private scope you are not logged in to. A private package looks exactly like a nonexistent one to someone without access, which is why all three collapse into this single line. npm view @acme/ui version confirms whether the name exists publicly, and for a private scope check that .npmrc has the registry and token for that scope. Both checks only read.

Q. How do I fix it?

npm view @acme/ui version — before running it, check the explanation above for what this command discards.

Q. Which tool prints this?

npm. It sits under npm, and the message runs to 11 words.

Errors nearby