planetoftheweb / learnangular

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

npm start "Cannot find name 'Promise'" #15

Open Pimentelk opened 6 years ago

Pimentelk commented 6 years ago

Whenever I try to run npm start on any branch that isn't the master branch I get the following errors.

I run npm install before making an attempt to start.

$npm start

learn-angular@1.0.0 start C:\xampp\htdocs\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(355,48): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(356,52): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(357,34): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(358,34): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(359,34): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(360,61): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(361,60): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(362,65): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(362,97): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(363,60): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(364,58): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(365,59): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(366,58): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(367,61): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(367,117): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(368,42): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(370,81): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(371,78): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(372,76): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(373,73): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(436,6): error TS2304: Cannot find name 'Symbol'. node_modules/@types/core-js/index.d.ts(461,39): error TS2304: Cannot find name 'Promise'. node_modules/@types/core-js/index.d.ts(469,59): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(470,59): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(472,48): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(473,69): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(477,40): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(479,48): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(695,55): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(696,45): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(712,46): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(713,43): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(829,20): error TS2304: Cannot find name 'PromiseConstructor'. node_modules/@types/core-js/index.d.ts(844,32): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(848,39): error TS2304: Cannot find name 'Iterable'. node_modules/@types/core-js/index.d.ts(848,53): error TS2304: Cannot find name 'Iterator'. node_modules/@types/core-js/index.d.ts(859,35): error TS2304: Cannot find name 'Promise'. node_modules/@types/core-js/index.d.ts(1486,36): error TS2339: Property 'for' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1490,43): error TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1494,50): error TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1498,40): error TS2339: Property 'iterator' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1502,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1506,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1510,39): error TS2339: Property 'replace' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1514,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1518,39): error TS2339: Property 'species' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1522,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1526,43): error TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1530,43): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1534,43): error TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2305,36): error TS2339: Property 'for' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2309,43): error TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2313,50): error TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2317,40): error TS2339: Property 'iterator' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2321,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2325,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2329,39): error TS2339: Property 'replace' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2333,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2337,39): error TS2339: Property 'species' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2341,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2345,43): error TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2349,43): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2353,43): 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'. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! learn-angular@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the learn-angular@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\TheMi\AppData\Roaming\npm-cache_logs\2018-02-02T02_31_29_947Z-debug.log

pujoey commented 6 years ago

Same issue for me but only happens on individual branches and not master branch. Any idea??

StPaulStylee commented 6 years ago

Me too. Frustrated. Any answers out there?

danieldogeanu commented 6 years ago

From my understanding, the typings are not installed, or for some reason, are not working.

martingenchev commented 6 years ago

check the previous issue and you have the solution for the problem :) https://github.com/planetoftheweb/learnangular/issues/13

x3lq commented 6 years ago

Here the answer from closed section which should be the same martingenchev means ;)

Opening tsconfig.json and changing: "target": "es5" to "target": "es6"

ConnieHirsch commented 5 years ago

Thanks, I ran into the same problem.

michielev commented 5 years ago

Thank you! I was pulling my hair out over this!