0

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?

mbilyanov
  • 1,687
  • 2
  • 19
  • 35
  • did you look at `/Users/me/.npm/_logs/2018-10-25T22_24_12_353Z-debug.log` – Bravo Oct 25 '18 at 22:32
  • I have the feeling that this 'default-html-example' is something I have created somewhere, but I don't understand how it is breaking the whole npm now?! – mbilyanov Oct 25 '18 at 22:33
  • well, the `-g` may be a clue – Bravo Oct 25 '18 at 22:33
  • @Bravo Yes. What exactly I need to be looking for? I literally started learning node and javascript a week ago and this happens. – mbilyanov Oct 25 '18 at 22:34
  • Wow, I did a system-wide search and this is what I have found: `./usr/local/lib/node_modules/default-html-example` How on earth this happened? – mbilyanov Oct 25 '18 at 22:35
  • well, `-g` is referring to `global` - not sure where global npm's are in your setup - perhaps there's some documentation somewhere – Bravo Oct 25 '18 at 22:36
  • They are talking about it here: https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x But I still do not understand. – mbilyanov Oct 25 '18 at 22:37
  • Removing that stray folder fixed the problem. – mbilyanov Oct 25 '18 at 22:50
  • Good to know - what was in the folder? – Bravo Oct 25 '18 at 22:52
  • `/usr/local/lib/node_modules/default-html-example` I have added it to the end of the question above. Not sure how it ended up in there, as a module?! – mbilyanov Oct 25 '18 at 23:09

1 Answers1

0

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.

mbilyanov
  • 1,687
  • 2
  • 19
  • 35