【问题标题】:"npm not being able to find a file abbrev" when installing aurelia cli安装 aurelia cli 时出现“npm 找不到文件缩写”
【发布时间】:2017-04-24 17:11:44
【问题描述】:

我正在我的生产版本中安装 aurelia-cli。我遵循'http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/the-aurelia-cli'的指示,现在每次我尝试运行npm install aurelia-cli -g时都会出现以下错误:

npm ERR! Linux 4.2.0-042stab113.11
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install" "aurelia-cli" "-g"
npm ERR! node v4.2.6
npm ERR! npm  v4.0.3
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-d3948789
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-d3948789' -> '/usr/local/lib/node_modules/aurelia-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-d3948789' -> '/usr/local/lib/node_modules/aurelia-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /etc/apt/npm-debug.log

【问题讨论】:

  • 您确定您使用的是更新版本的 node 和 npm?
  • 看来问题很可能与 node.js 和 npm 有关,而不是与 aurelia 有关。
  • 是的,我正在使用两者的更新版本,问题仅与 npm 有关,但如何解决此错误..

标签: linux npm aurelia


【解决方案1】:

我不知道具体的错误,但是,这通常对我有用,并且 aurelia 人经常在 gitter 上推荐这种重新安装的方法:

npm uninstall -g aurelia-cli
npm clear cache
npm install -g aurelia-cli
rm -rf node_modules
npm install
npm install # on freebsd sometimes I have to run this more than once

【讨论】:

    猜你喜欢
    • 2017-03-12
    • 2023-03-29
    • 2018-03-02
    • 2018-03-14
    • 1970-01-01
    • 1970-01-01
    • 2019-07-08
    • 2021-11-25
    • 2017-11-07
    相关资源
    最近更新 更多