简体   繁体   中英

NPM broken and reporting this error: npm ERR! 404

I am running npm update -g and I get

npm ERR! code E404
npm ERR! 404 Not found : default-html-example
npm ERR! 404
npm ERR! 404  'default-html-example' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2018-10-25T22_24_12_353Z-debug.log

So, I get this after any command now, for example in any project, when I run ./node_modules/.bin/eslin . I get the linter results, but at the end of the verbose there is always this error.

--- UPDATE ---

Upon further investigation, I have found this.

  • Something called /usr/local/lib/node_modules/default-html-example
  • This is something I have worked on as an example as part of one of my first tutorials. Not sure about how on earth it ended up there.
  • When I checked it, it turns out it is a symlink to a tutorial: default-html-example -> /Users/me/learning/lynda_com_JavaScript_Essential_Training/MY_Ex_Files_JavaScript_EssT/Exercise_Files/default

This is still a mystery, how it ended up there?

Finding and removing that rogue folder /usr/local/lib/node_modules/default-html-example solved the issue.

However, I am still not sure how that folder ended up in that location. It was one of my first tutorial project folders.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM