planetoftheweb / learnangular

Repository for my Learn Angular Course
76 stars 146 forks source link

npm start doesnt work #6

Closed erick2014 closed 7 years ago

erick2014 commented 7 years ago

➜ learnangular git:(master) npm start

learn-angular@1.0.0 start /Users/egarcia/Documents/learnangular tsc && concurrently "tsc -w" "lite-server"

node_modules/@angular/common/src/pipes/async_pipe.d.ts(39,38): error TS2304: Cannot find name 'Promise'. 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(31,124): error TS2304: Cannot find name 'Promise'. 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(40,49): error TS2304: Cannot find name 'Promise'. node_modules/@angular/compiler/src/runtime_compiler.d.ts(42,65): error TS2304: Cannot find name 'Promise'. node_modules/@angular/compiler/src/util.d.ts(35,18): error TS2304: Cannot find name 'Promise'. node_modules/@angular/compiler/src/util.d.ts(36,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/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'. node_modules/@angular/core/src/linker/ng_module_factory_loader.d.ts(14,34): error TS2304: Cannot find name 'Promise'. node_modules/@angular/core/src/linker/system_js_ng_module_factory_loader.d.ts(28,25): error TS2304: Cannot find name 'Promise'. node_modules/@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl.d.ts(10,23): error TS2304: Cannot find name 'Promise'. node_modules/@types/core-js/index.d.ts(47,36): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(350,48): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(351,52): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(352,34): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(353,34): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(354,34): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(355,61): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(356,60): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(357,65): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(357,97): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(358,60): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(359,58): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(360,59): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(361,58): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(362,61): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(362,117): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(363,42): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(365,81): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(366,78): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(367,76): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(368,73): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(431,6): error TS2304: Cannot find name 'Symbol'. node_modules/@types/core-js/index.d.ts(456,39): error TS2304: Cannot find name 'Promise'. node_modules/@types/core-js/index.d.ts(464,59): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(465,59): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(467,48): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(468,69): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(472,40): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(474,48): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(494,55): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(495,45): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(511,46): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(512,43): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(627,18): error TS2304: Cannot find name 'PromiseConstructor'. node_modules/@types/core-js/index.d.ts(642,32): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(646,39): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(646,53): error TS2304: Cannot find name 'Iterator'. node_modules/@types/core-js/index.d.ts(657,35): error TS2304: Cannot find name 'Promise'. node_modules/@types/core-js/index.d.ts(1280,34): error TS2339: Property 'for' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1284,41): error TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1288,48): error TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1292,38): error TS2339: Property 'iterator' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1296,36): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1300,35): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1304,37): error TS2339: Property 'replace' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1308,36): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1312,37): error TS2339: Property 'species' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1316,35): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1320,41): error TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1324,41): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1328,41): error TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2059,34): error TS2339: Property 'for' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2063,41): error TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2067,48): error TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2071,38): error TS2339: Property 'iterator' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2075,36): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2079,35): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2083,37): error TS2339: Property 'replace' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2087,36): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2091,37): error TS2339: Property 'species' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2095,35): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2099,41): error TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2103,41): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2107,41): error TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'. node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promise'. node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promise'. node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promise

ghost commented 7 years ago

change target to "es6" in systemjs.config.json

seithenin commented 7 years ago

I think onemartian means to edit the tsconfig.json file in the root directory and change the target value there from "es5" to "es6". I had the same problem and this fixed it for me.

romi012 commented 7 years ago

NPM DEBUG error npm is not working 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@3.10.10 3 info using node@v6.10.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle learn-angular@1.0.0~prestart: learn-angular@1.0.0 6 silly lifecycle learn-angular@1.0.0~prestart: no script for prestart, continuing 7 info lifecycle learn-angular@1.0.0~start: learn-angular@1.0.0 8 verbose lifecycle learn-angular@1.0.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle learn-angular@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\ROMI\desktop\learnangular\node_modules.bin;C:\Users\ROMI\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\ROMI\bin;C:\product\11.2.0\dbhome_1\bin;E:\app\ROMI\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files\Java\jdk1.7.0_75\bin;C:\Program Files\Java\jre7\bin;%OPENCV_BUILD%x64\vc10\bin;C:\Users\ROMI\SDK\tools;C:\Program Files (x86)\Skype\Phone;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk1.7.0_75\bin;C:\Users\ROMI\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl 10 verbose lifecycle learn-angular@1.0.0~start: CWD: C:\Users\ROMI\desktop\learnangular 11 silly lifecycle learn-angular@1.0.0~start: Args: [ '/d /s /c', 'tsc && concurrently "tsc -w" "lite-server" ' ] 12 silly lifecycle learn-angular@1.0.0~start: Returned: code: 2 signal: null 13 info lifecycle learn-angular@1.0.0~start: Failed to exec start script 14 verbose stack Error: learn-angular@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" 14 verbose stack Exit status 2 14 verbose stack at EventEmitter. (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. (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 learn-angular@1.0.0 16 verbose cwd C:\Users\ROMI\desktop\learnangular 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.10.0 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error learn-angular@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" 22 error Exit status 2 23 error Failed at the learn-angular@1.0.0 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 learn-angular 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 learn-angular 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls learn-angular 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

brockfanning commented 7 years ago

Same problem here. Changing "es6" to "es5" in tsconfig.json also fixed it for me, as mentioned above. However an alternative that seems to also work is to add "lib": ["dom", "es6"], beneath the es5 line, so that the file starts like this:

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "es6"],

...

mowamed commented 7 years ago

changed the target value from "es5" to "es6". worked for me

technbuzz commented 7 years ago

Worked for by changing target to es6. I think this issue should be closed as method shown by @onemartian solves this issue.

planetoftheweb commented 7 years ago

Modified the target to ES6.