2016-11-12 1 views
1

을 실행 한 후 나는 각도 빠른 시작의 단계를 수행하고, 그러나 결국, 실행 후 나에게 다음과 같은 오류가 있습니다 "고궁 박물원 시작"응용 프로그램 충돌 NPM 시작 명령

node_modules/@angular/common/src/directives/ng_class.d.ts(46,34): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/common/src/pipes/async_pipe.d.ts(44,38): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/compile_metadata.d.ts(347,20): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/compiler/src/compile_metadata.d.ts(348,15): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/compiler/src/directive_normalizer.d.ts(19,100): error TS2304: Cannot find name 'Promise'. 

node_modules/@angular/compiler/src/directive_normalizer.d.ts(21,74): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/offline_compiler.d.ts(19,32): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/compiler/src/offline_compiler.d.ts(43,9): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/output/output_ast.d.ts(424,63): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/compiler/src/resource_loader.d.ts(13,23): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/runtime_compiler.d.ts(45,49): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/runtime_compiler.d.ts(47,65): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/util.d.ts(25,18): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/compiler/src/util.d.ts(26,46): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_init.d.ts(16,18): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_ref.d.ts(106,67): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_ref.d.ts(122,101): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_ref.d.ts(148,67): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_ref.d.ts(150,101): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(28,16): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/di/reflective_provider.d.ts(88,123): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/di/reflective_provider.d.ts(88,165): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(4,9): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(5,23): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(6,25): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/core/src/linker/compiler.d.ts(53,49): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/compiler.d.ts(61,65): error TS2304: Cannot find name 'Promise'. 

NPM-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 [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
5 info lifecycle [email protected]~prestart: [email protected] 
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 
7 info lifecycle [email protected]~start: [email protected] 
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
9 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\user\Desktop\angular-2\angular-quickstart\node_modules\.bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\nodejs\;C:\Users\user\AppData\Local\atom\bin;C:\Users\user\AppData\Roaming\npm 
10 verbose lifecycle [email protected]~start: CWD: C:\Users\user\Desktop\angular-2\angular-quickstart 
11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'tsc && concurrently "tsc -w" "lite-server" ' ] 
12 silly lifecycle [email protected]~start: Returned: code: 2 signal: null 
13 info lifecycle [email protected]~start: Failed to exec start script 
14 verbose stack Error: [email protected] start: `tsc && concurrently "tsc -w" "lite-server" ` 
14 verbose stack Exit status 2 
14 verbose stack  at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16) 
14 verbose stack  at emitTwo (events.js:106:13) 
14 verbose stack  at EventEmitter.emit (events.js:191:7) 
14 verbose stack  at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 
14 verbose stack  at emitTwo (events.js:106:13) 
14 verbose stack  at ChildProcess.emit (events.js:191:7) 
14 verbose stack  at maybeClose (internal/child_process.js:877:16) 
14 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 
15 verbose pkgid [email protected] 
16 verbose cwd C:\Users\user\Desktop\angular-2\angular-quickstart 
17 error Windows_NT 6.1.7601 
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 
19 error node v6.9.1 
20 error npm v3.10.8 
21 error code ELIFECYCLE 
22 error [email protected] start: `tsc && concurrently "tsc -w" "lite-server" ` 
22 error Exit status 2 
23 error Failed at the [email protected] start script 'tsc && concurrently "tsc -w" "lite-server" '. 
23 error Make sure you have the latest version of node.js and npm installed. 
23 error If you do, this is most likely a problem with the angular-quickstart package, 
23 error not with npm itself. 
23 error Tell the author that this fails on your system: 
23 error  tsc && concurrently "tsc -w" "lite-server" 
23 error You can get information on how to open an issue for this project with: 
23 error  npm bugs angular-quickstart 
23 error Or if that isn't available, you can get their info via: 
23 error  npm owner ls angular-quickstart 
23 error There is likely additional logging output above. 
24 verbose exit [ 1, true ] 

: tsconfig.json의 "target"옵션을 "es5"에서 "es6"으로 변경하면 앱이 실행되기 시작합니다. 도와주세요. compilerOptions에서 tsconfig에서

+0

당신은'NPM의 install '이다 했습니까? – prakharsingh95

+0

네, 몇 번 : – beqa

답변

1
npm install --save-dev @types/core-js 

추가 :

"typeRoots": [ 
    "../node_modules/@types" 
], 
"types": [ 
    "core-js" 
] 
+0

고마워요, 잘 작동합니다. 내가 뭘 잘못했는지 설명해 주시겠습니까? 그리고이 행들은 무엇을 했습니까? – beqa