npm 版本显示错误:找不到模块“可读流" [英] npm version shows Error: Cannot find module 'readable-stream'

查看:134
本文介绍了npm 版本显示错误:找不到模块“可读流"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 Windows 7 机器上安装了 node js,版本显示为 v4.1.2,但是当我尝试运行 npm install 甚至检查 npm 版本时,它抛出以下错误.谁能帮我看看哪里出了问题?

I have installed node js on my windows 7 machine, and the version is being shown as v4.1.2 but when I am trying to run npm install or even check npm version it throwing the following error. Can any one help me where is the problem?

C:\Users\nmadasu>npm version
module.js:338
    throw err;
    ^

Error: Cannot find module 'readable-stream'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\nmadasu\AppData\Roaming\npm\node_modules\npm
\node_modules\are-we-there-yet\index.js:2:14)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

阅读后(Node.js 找不到模块 'readable-stream') 解决方案,我尝试了 npm install gulp -g,即使这也给出了同样的错误.

After reading SO (Node.js cannot find module 'readable-stream') solutions, I tried npm install gulp -g, even this also giving same error.

C:\Users\nmadasu>npm install gulp -g
module.js:338
    throw err;
    ^

Error: Cannot find module 'readable-stream'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\nmadasu\AppData\Roaming\npm\node_modules\npm
\node_modules\are-we-there-yet\index.js:2:14)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

推荐答案

尝试:

npm install -g 可读流

之后:

npm install gulp -g

这篇关于npm 版本显示错误:找不到模块“可读流"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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