当运行npm时我得到这个错误 - npm在Ubuntu 14上找不到模块'are-we-there-yet'

时间:2021-11-20 20:39:57

I've followed the guide over at

我跟着指南了

npm doesn't work, get always this error -> Error: Cannot find module 'are-we-there-yet'

npm不起作用,总是得到这个错误 - >错误:找不到模块'我们还在那里'

However, when I run the

但是,当我跑的时候

cd /usr/local/Cellar/node/0.10.40/lib/node_modules [adjusted for current version

Command it says it doesn't exist... which it doesn't....

命令它说它不存在......它不存在......

In fact there is no local/Cellar command.

事实上,没有本地/地窖指令。

node --version returns 0.10.40

node --version返回0.10.40

every time I run npm i receive this error

每次我运行npm我都会收到此错误

module.js:340
throw err;
      ^
Error: Cannot find module 'are-we-there-yet'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> 
(/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:2:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

I installed nodejs with apt-get.

我用apt-get安装了nodejs。

I wanted to post this as a comment on the original link but need some rep for that.

我想发布这个作为对原始链接的评论,但需要一些代表。

1 个解决方案

#1


1  

I think its beacause of npm version incompatibility I went through following steps

我认为这是由于npm版本不兼容我经历了以下步骤

$>npm --version
$>1.3.10
$>sudo npm install -g --upgrade npm
$>npm --version
$>2.12.0

now everything working fine for me.

现在一切正常,对我来说。

More detailed information at http://paste.openstack.org/show/473108/

更多详细信息,请访问http://paste.openstack.org/show/473108/

#1


1  

I think its beacause of npm version incompatibility I went through following steps

我认为这是由于npm版本不兼容我经历了以下步骤

$>npm --version
$>1.3.10
$>sudo npm install -g --upgrade npm
$>npm --version
$>2.12.0

now everything working fine for me.

现在一切正常,对我来说。

More detailed information at http://paste.openstack.org/show/473108/

更多详细信息,请访问http://paste.openstack.org/show/473108/