错误“找不到模块‘npmlog’"在“npm update -g"之后 [英] Error "Cannot find module 'npmlog'" after "npm update -g"

查看:69
本文介绍了错误“找不到模块‘npmlog’"在“npm update -g"之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 NVM 0.30.1 并用它在 Fedora 22 上安装 node.js v5.4.0(带有 NPM 3.5.4).当我运行 npm update -g 时,我收到以下信息警告:

I have NVM 0.30.1 and used it to install node.js v5.4.0 (with NPM 3.5.4) on Fedora 22. When I run npm update -g, I receive the following warnings:

npm WARN EBUNDLEOVERRIDE Replacing bundled npm > init-package-json with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > node-gyp with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > npm-install-checks with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > npmlog with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > read-package-json with new installed version

之后,当我运行 npm 时,我收到此错误:

And after that, when I run npm I get this error:

module.js:328
    throw err;
    ^

Error: Cannot find module 'npmlog'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at /home/peflorencio/.nvm/versions/node/v5.4.0/lib/node_modules/npm/bin/npm-cli.js:20:13
    at Object.<anonymous> (/home/peflorencio/.nvm/versions/node/v5.4.0/lib/node_modules/npm/bin/npm-cli.js:76:3)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)

有谁知道它是什么以及如何解决它?

Does anyone know what it is and how to solve it?

谢谢

推荐答案

感谢您的回答.这是一个错误,并且已经在 Node v5.4.1 中修复.现在它像往常一样工作了.

Thanks for the answers. It was a bug and it has already been fixed in Node v5.4.1. Now it's working as usual.

这篇关于错误“找不到模块‘npmlog’"在“npm update -g"之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆