在使用 npm 安装任何 Node 包时,出现以下错误:
C:\Users\460785>npm install express -g npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "express" "-g" npm ERR! node v6.2.1 npm ERR! npm v3.9.3 npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'github-url-from-git' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR!
https://github.com/npm/npm/issuesnpm ERR! Please include the following file with any support request: npm ERR! C:\Users\460785\npm-debug.log
我试过一次又一次重装node.js,一个是稳定版,一个是最新版。尽管如此,我还是遇到了同样的错误。
最佳答案
github 好像多人有一个类似的问题。
正如用户 GregWoods 所说,您可能想要完全卸载 node.js 并删除 Program Files 文件夹中的所有剩余文件,然后重新安装。
关于node.js - 无法使用 npm 安装 Node 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37808993/