coursefiles / angular2-essential-training

The repository for the project code for my course Angular Essential Training
https://www.linkedin.com/learning/angular-2-essential-training-2
MIT License
197 stars 1.06k forks source link

Error when on 'npm start', please help. #16

Open alvinmislang opened 6 years ago

alvinmislang commented 6 years ago

node_modules/@types/core-js/index.d.ts(2294,36): error TS2339: Property 'for' do es not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2298,43): error TS2339: Property 'hasInst ance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2302,50): error TS2339: Property 'isConca tSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2306,40): error TS2339: Property 'iterato r' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2310,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2314,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2318,39): error TS2339: Property 'replace ' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2322,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2326,39): error TS2339: Property 'species ' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2330,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2334,43): error TS2339: Property 'toPrimi tive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2338,43): error TS2339: Property 'toStrin gTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2342,43): error TS2339: Property 'unscopa bles' does not exist on type 'SymbolConstructor'. node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promis e'. node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promis e'. node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promis e'. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! angular2-essential-training@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular2-essential-training@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\alvin\AppData\Roaming\npm-cache_logs\2017-12-19T13_1300 203Z-debug.log

C:\Users\alvin\angular2-essential-training>npm start npm ERR! missing script: start

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\alvin\AppData\Roaming\npm-cache_logs\2017-12-19T13_2439 274Z-debug.log

C:\Users\alvin\angular2-essential-training>npm start npm ERR! missing script: start

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\alvin\AppData\Roaming\npm-cache_logs\2017-12-19T13_2456 674Z-debug.log

C:\Users\alvin\angular2-essential-training>npm run clean

angular2-essential-training@1.0.0 clean C:\Users\alvin\angular2-essential-trai ning rimraf app/*/.js app/*/.js.map

C:\Users\alvin\angular2-essential-training>npm install npm WARN angular2-essential-training@1.0.0 No license field.

added 341 packages and updated 2 packages in 91.606s

C:\Users\alvin\angular2-essential-training>npm start

angular2-essential-training@1.0.0 prestart C:\Users\alvin\angular2-essential-t raining npm run clean

angular2-essential-training@1.0.0 clean C:\Users\alvin\angular2-essential-trai ning rimraf app/*/.js app/*/.js.map

angular2-essential-training@1.0.0 start C:\Users\alvin\angular2-essential-trai ning tsc && concurrently "tsc -w" "lite-server"

app/mock-xhr-backend.ts(61,38): error TS2339: Property 'find' does not exist on type '{ id: number; name: string; medium: string; category: string; year: number ; watchedOn: number; is...'. node_modules/@angular/common/src/pipes/async_pipe.d.ts(39,38): error TS2304: Can not find name 'Promise'. node_modules/@angular/compiler/src/directive_normalizer.d.ts(19,100): error TS23 04: Cannot find name 'Promise'. node_modules/@angular/compiler/src/directive_normalizer.d.ts(21,74): error TS230 4: 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: Ca nnot find name 'Promise'. node_modules/@angular/compiler/src/runtime_compiler.d.ts(40,49): error TS2304: C annot find name 'Promise'. node_modules/@angular/compiler/src/runtime_compiler.d.ts(42,65): error TS2304: C annot find name 'Promise'. node_modules/@angular/compiler/src/util.d.ts(35,18): error TS2304: Cannot find n ame 'Promise'. node_modules/@angular/compiler/src/util.d.ts(36,46): error TS2304: Cannot find n ame 'Promise'. node_modules/@angular/core/src/application_init.d.ts(16,18): error TS2304: Canno t find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(106,67): error TS2304: Canno t find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(122,101): error TS2304: Cann ot find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(148,67): error TS2304: Canno t find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(150,101): error TS2304: Cann ot find name 'Promise'. node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot fin d name 'Map'. node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot fin d 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): erro r 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_load er_impl.d.ts(10,23): error TS2304: Cannot find name 'Promise'. node_modules/@angular/router/src/config.d.ts(279,62): error TS2304: Cannot find name 'Promise'. node_modules/@angular/router/src/interfaces.d.ts(78,99): error TS2304: Cannot fi nd name 'Promise'. node_modules/@angular/router/src/interfaces.d.ts(157,109): error TS2304: Cannot find name 'Promise'. node_modules/@angular/router/src/interfaces.d.ts(227,115): error TS2304: Cannot find name 'Promise'. node_modules/@angular/router/src/interfaces.d.ts(297,91): error TS2304: Cannot f ind name 'Promise'. node_modules/@angular/router/src/interfaces.d.ts(367,50): error TS2304: Cannot f ind name 'Promise'. node_modules/@angular/router/src/router.d.ts(386,70): error TS2304: Cannot find name 'Promise'. node_modules/@angular/router/src/router.d.ts(408,59): error TS2304: Cannot find name 'Promise'. node_modules/@angular/router/src/utils/collection.d.ts(35,58): error TS2304: Can not find name 'Promise'. node_modules/@types/core-js/index.d.ts(47,36): error TS2304: Cannot find name 'I terable'. node_modules/@types/core-js/index.d.ts(353,48): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(354,52): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(355,34): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(356,34): 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,61): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(359,60): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(360,65): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(360,97): 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,58): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(363,59): 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,61): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(365,117): error TS2304: Cannot find name 'PropertyKey'. node_modules/@types/core-js/index.d.ts(366,42): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(368,81): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(369,78): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(370,76): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(371,73): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(434,6): error TS2304: Cannot find name 'S ymbol'. node_modules/@types/core-js/index.d.ts(459,39): error TS2304: Cannot find name ' Promise'. node_modules/@types/core-js/index.d.ts(467,59): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(468,59): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(470,48): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(471,69): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(475,40): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(477,48): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(693,55): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(694,45): error TS2304: Cannot find name ' PropertyKey'. node_modules/@types/core-js/index.d.ts(710,46): error TS2304: Cannot find name ' Iterable'. node_modules/@types/core-js/index.d.ts(711,43): error TS2304: Cannot find name ' Iterable'. node_modules/@types/core-js/index.d.ts(826,20): error TS2304: Cannot find name ' PromiseConstructor'. node_modules/@types/core-js/index.d.ts(841,32): error TS2304: Cannot find name ' Iterable'. node_modules/@types/core-js/index.d.ts(845,39): error TS2304: Cannot find name ' Iterable'. node_modules/@types/core-js/index.d.ts(845,53): error TS2304: Cannot find name ' Iterator'. node_modules/@types/core-js/index.d.ts(856,35): error TS2304: Cannot find name ' Promise'. node_modules/@types/core-js/index.d.ts(1479,36): error TS2339: Property 'for' do es not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1483,43): error TS2339: Property 'hasInst ance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1487,50): error TS2339: Property 'isConca tSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1491,40): error TS2339: Property 'iterato r' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1495,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1499,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1503,39): error TS2339: Property 'replace ' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1507,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1511,39): error TS2339: Property 'species ' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1515,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1519,43): error TS2339: Property 'toPrimi tive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1523,43): error TS2339: Property 'toStrin gTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(1527,43): error TS2339: Property 'unscopa bles' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2294,36): error TS2339: Property 'for' do es not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2298,43): error TS2339: Property 'hasInst ance' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2302,50): error TS2339: Property 'isConca tSpreadable' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2306,40): error TS2339: Property 'iterato r' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2310,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2314,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2318,39): error TS2339: Property 'replace ' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2322,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2326,39): error TS2339: Property 'species ' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2330,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2334,43): error TS2339: Property 'toPrimi tive' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2338,43): error TS2339: Property 'toStrin gTag' does not exist on type 'SymbolConstructor'. node_modules/@types/core-js/index.d.ts(2342,43): error TS2339: Property 'unscopa bles' does not exist on type 'SymbolConstructor'. node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promis e'. node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promis e'. node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promis e'. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! angular2-essential-training@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular2-essential-training@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\alvin\AppData\Roaming\npm-cache_logs\2017-12-19T13_4542 931Z-debug.log

C:\Users\alvin\angular2-essential-training>

ghost commented 6 years ago

I get the same error.

mariamarinescu commented 5 years ago

same here, from branch '02_01b'

PS C:\Users\Andrei\newProject\angular2-essential-training> npm install

> uws@0.14.5 install C:\Users\Andrei\newProject\angular2-essential-training\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

npm WARN angular2-essential-training@2.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 319 packages from 220 contributors and audited 870 packages in 9.384s
found 31 vulnerabilities (12 low, 15 moderate, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details
PS C:\Users\Andrei\newProject\angular2-essential-training> npm start

> angular2-essential-training@2.0.0 prestart C:\Users\Andrei\newProject\angular2-essential-training
> npm run clean

> angular2-essential-training@2.0.0 clean C:\Users\Andrei\newProject\angular2-essential-training
> rimraf app/**/*.js app/**/*.js.map

> angular2-essential-training@2.0.0 start C:\Users\Andrei\newProject\angular2-essential-training
> tsc && concurrently "tsc -w" "lite-server"

app/main.ts(1,40): error TS2307: Cannot find module '@ngular/platform-browser-dynamic'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular2-essential-training@2.0.0 start: `tsc && concurrently "tsc -w" "lite-server" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular2-essential-training@2.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\Andrei\AppData\Roaming\npm-cache\_logs\2019-01-10T09_57_38_242Z-debug.log
PS C:\Users\Andrei\newProject\angular2-essential-training> npm run clean

> angular2-essential-training@2.0.0 clean C:\Users\Andrei\newProject\angular2-essential-training
> rimraf app/**/*.js app/**/*.js.map

PS C:\Users\Andrei\newProject\angular2-essential-training> npm start

> angular2-essential-training@2.0.0 prestart C:\Users\Andrei\newProject\angular2-essential-training
> npm run clean

> angular2-essential-training@2.0.0 clean C:\Users\Andrei\newProject\angular2-essential-training
> rimraf app/**/*.js app/**/*.js.map

> angular2-essential-training@2.0.0 start C:\Users\Andrei\newProject\angular2-essential-training
> tsc && concurrently "tsc -w" "lite-server"

app/main.ts(1,40): error TS2307: Cannot find module '@ngular/platform-browser-dynamic'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular2-essential-training@2.0.0 start: `tsc && concurrently "tsc -w" "lite-server" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular2-essential-training@2.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\Andrei\AppData\Roaming\npm-cache\_logs\2019-01-10T09_58_59_963Z-debug.log
mariamarinescu commented 5 years ago

I fixed it by changing package.json to this:

"scripts": {
    "clean": "rimraf app/**/*.js app/**/*.js.map",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "prestart": "npm run clean",
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
  }
mohammadjouhari commented 4 years ago

I get dirrfrent issue 23 error Failed at the angular2-essential-training@2.0.0 clean script. 23 error This is probably not a problem with npm. There is likely additional logging output above.

shahil-kv commented 1 year ago

please remove the package.json lock and node modules and try npm install i think it will solve the issue if it is still there then try the package.json packages version