代码之家  ›  专栏  ›  技术社区  ›  mbilyanov

NPM中断并报告此错误:NPM ERR!404

  •  0
  • mbilyanov  · 技术社区  · 6 年前

    我在跑步 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 .

    ---更新---

    经进一步调查,我发现了这个。

    • 一种叫做 /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

    这仍然是一个谜,它是如何在那里结束的?

    1 回复  |  直到 6 年前
        1
  •  0
  •   mbilyanov    6 年前

    查找并删除该rogue文件夹 /usr/local/lib/node_modules/default-html-example

    但是,我仍然不知道该文件夹如何在该位置结束。这是我的第一个教程项目文件夹之一。