I am following tutorial at github: https://github.com/AngularClass/angular2-webpack-starter/
我在github上跟随教程:https://github.com/AngularClass/angular2-webpack-starter/。
I installed node+npm and run npm install. Clone git repository, run npm install and then when I want to run npm start, it fails with error message.
我安装了节点+npm并运行npm安装。克隆git存储库,运行npm安装,然后当我想要运行npm启动时,它会失败,错误消息。
This is debug log
这是调试日志
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@2.14.12
3 info using node@v4.3.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart angular2-webpack-starter@3.0.0
6 info start angular2-webpack-starter@3.0.0
7 verbose unsafe-perm in lifecycle true
8 info angular2-webpack-starter@3.0.0 Failed to exec start script
9 verbose stack Error: angular2-webpack-starter@3.0.0 start: `npm run server:dev`
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:821:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid angular2-webpack-starter@3.0.0
11 verbose cwd C:\Users\branislav.remen\Workspaces\Angular2-ws\test\angular2-webpack-starter
12 error Windows_NT 6.1.7601
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
14 error node v4.3.0
15 error npm v2.14.12
16 error code ELIFECYCLE
17 error angular2-webpack-starter@3.0.0 start: `npm run server:dev`
17 error Exit status 1
18 error Failed at the angular2-webpack-starter@3.0.0 start script 'npm run server:dev'.
18 error This is most likely a problem with the angular2-webpack-starter package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error npm run server:dev
18 error You can get their info via:
18 error npm owner ls angular2-webpack-starter
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
1 个解决方案
#1
0
your npm version is relatively ancient, you should update to the latest npm 3.x.
您的npm版本比较古老,您应该更新到最新的npm 3.x。
Npm 3 introduced a lot of changes, like a maximally flat dependency tree, support for packages with strange names, etc.
Npm 3引入了许多变化,比如最大的平依赖树,对带有奇怪名称的包的支持等等。
all these starter tutorials run using the latest npm. No need to update node, 4.3 is OK. Try the following steps to see if it works:
所有这些入门教程都使用最新的npm。不需要更新节点,4.3是可以的。试试下面的步骤,看看效果如何:
- upgrade npm to npm 3
- 升级npm至npm 3。
- remove node_modules
- 删除node_modules
- run npm install again
- 再次运行npm安装
#1
0
your npm version is relatively ancient, you should update to the latest npm 3.x.
您的npm版本比较古老,您应该更新到最新的npm 3.x。
Npm 3 introduced a lot of changes, like a maximally flat dependency tree, support for packages with strange names, etc.
Npm 3引入了许多变化,比如最大的平依赖树,对带有奇怪名称的包的支持等等。
all these starter tutorials run using the latest npm. No need to update node, 4.3 is OK. Try the following steps to see if it works:
所有这些入门教程都使用最新的npm。不需要更新节点,4.3是可以的。试试下面的步骤,看看效果如何:
- upgrade npm to npm 3
- 升级npm至npm 3。
- remove node_modules
- 删除node_modules
- run npm install again
- 再次运行npm安装