Angular' 5-minute quickstart在package.json中有以下内容:
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings":"^1.0.4"
}
当我执行npm install
时,“依赖关系”部分中列出的模块安装时没有错误,但在尝试安装devDependencies时出现错误(见下文)。
我尝试单独安装这些软件包并注意到我不能--save-dev
但可以通过全局选项-g
进行安装。也就是说,对于并发包,
npm install concurrently --save-dev # does NOT work, same error
npm install concurrently -g # does work
事实上,如果我全局安装所有devDependencies,我可以完成快速入门。
这很好,但希望更好地了解--save-dev
安装失败的原因。
我有一个完全干净的Linux VM安装,当前版本的节点(v6.3.0)和npm(v3.10.3)。
提前致谢!
克里斯
npm ERR! Linux 3.13.0-92-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "concurrently" "--save-dev"
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! path /vagrant/angular2-quickstart/node_modules/concurrently/src/main.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/angular2-quickstart/node_modules/concurrently/src/main.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/angular2-quickstart/node_modules/concurrently/src/main.js'
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! /vagrant/angular2-quickstart/npm-debug.log