我在运行npm update -g
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所以,我现在在任何命令之后都会得到这个结果,例如在任何项目中,当我运行./node_modules/.bin/eslin .时,我会得到linter结果,但是在冗长的末尾总是会出现这样的错误。
-更新
经过进一步调查,我发现了这一点。
/usr/local/lib/node_modules/default-html-example的东西default-html-example -> /Users/me/learning/lynda_com_JavaScript_Essential_Training/MY_Ex_Files_JavaScript_EssT/Exercise_Files/default的符号链接。这仍然是个谜,它是如何在那里结束的?
发布于 2018-10-25 23:22:41
找到并删除那个流氓文件夹/usr/local/lib/node_modules/default-html-example解决了这个问题。
但是,我仍然不确定该文件夹是如何在那个位置结束的。这是我第一个教程项目文件夹之一。
https://stackoverflow.com/questions/52998968
复制相似问题