安装aurelia cli时“npm无法找到文件缩写”

时间:2016-12-09 09:08:42

标签: linux npm aurelia

我正在我的生产版本中安装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

1 个答案:

答案 0 :(得分:0)

我不知道这个特定的错误,但是,这通常对我有用,并且这种重新安装的方法通常被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