【问题标题】:When running npm I get this error - npm cannot find module 'are-we-there-yet' on Ubuntu 14运行 npm 时出现此错误 - npm 在 Ubuntu 14 上找不到模块 'are-we-there-yet'
【发布时间】:2015-12-20 14:32:10
【问题描述】:

我已经按照指南在

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

但是,当我运行

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

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

其实没有local/Cellar命令。

node --version 返回 0.10.40

每次我运行 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)

我用 apt-get 安装了 nodejs。

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

【问题讨论】:

  • 您尝试重新安装了吗? 'sudo apt-get install --reinstall node'
  • cd /usr/local/lib/node_modules 代替 :)
  • 你是用哪个仓库安装node的?

标签: node.js ubuntu npm installation


【解决方案1】:

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

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

现在对我来说一切正常。

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

【讨论】:

    猜你喜欢
    • 2015-12-27
    • 2020-07-13
    • 2015-12-22
    • 2015-09-10
    • 2023-02-01
    • 2021-09-13
    • 2021-09-11
    • 1970-01-01
    • 2021-04-03
    相关资源
    最近更新 更多