-3
我试过了从https://angular.io/guide/quickstart的angular2 5 Min快速启动。所有文件都是通过复制&粘贴创建的,因为我很懒惰,并且可能有故障。我更喜欢TypeScript版本。最后,我必须编译并以“npm start”开始。我以管理员身份执行此操作我的操作系统是Windows 10. 开始后,我收到一些错误。这是npm-debug.log:Angularjs 2快速启动 - Npm运行错误
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 [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart [email protected]
7 info start [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec start script
10 verbose stack Error: [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
10 verbose stack Exit status 2
10 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid [email protected]
12 verbose cwd C:\web\angular2-quickstart
13 error Windows_NT 6.3.9600
14 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
15 error node v0.12.3
16 error npm v2.9.1
17 error code ELIFECYCLE
18 error [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
18 error Exit status 2
19 error Failed at the [email protected] start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
19 error This is most likely a problem with the angular2-quickstart package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error tsc && concurrently "npm run tsc:w" "npm run lite"
19 error You can get their info via:
19 error npm owner ls angular2-quickstart
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]
任何人都可以帮我得到快速启动应用程序启动? 我也尝试在Firefox中启动index.html(因为.ts文件全部翻译为.js文件),但没有任何反应。
试试这个http://stackoverflow.com/questions/34335340/angular2-quickstart-npm-start-is-not-working-correctly/36790628#36790628 – vineet
@clsah是遵循这个问题链接,并确保您已正确安装节点,并发,精简服务器和打字稿。 –