gpt4 book ai didi

npm - 模块.js :339 throw err; Error: Cannot find module 'npmlog' on WINDOWS 8 Pro

转载 作者:行者123 更新时间:2023-12-02 10:46:18 24 4
gpt4 key购买 nike

[module.js:339 抛出错误;

Error: Cannot find module 'npmlog' on WINDOWS 8 Pro

我尝试重新安装nodejs,但在Windows上仍然无法工作。

module.js:339
throw err;

Error: Cannot find module 'npmlog' at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:18:11
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

最佳答案

我刚刚在 OS X Yosemite 10.10.5 上遇到了这个问题。

This is caused by backwards incompatibilities with Node versions.

您可以通过删除所有旧的(不兼容的)节点模块来解决此问题:

  • *尼克斯
    • rm -rf/usr/local/bin/node_modules
  • Windows
    • rmdir %appdata%\npm\node_modules/s/q

关于npm - 模块.js :339 throw err; Error: Cannot find module 'npmlog' on WINDOWS 8 Pro,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34380752/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com