This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 229
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Error due to reference to types core-js #62
Copy link
Copy link
Closed
Description
Hello,
I'm working on the tour of heroes, implementing it with the AngularCLI and the last version of angular (2.1.0) => https://github.com/davinkevin/Angular2-TourOfHeroes.
So, at the part6 of the TourOfHeroes, I install the in-memory-web-api, but after serving the app I am facing the following error :
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts:1:0
Cannot find type definition file for 'core-js'.
The line 1 of the file https://github.com/angular/in-memory-web-api/blob/master/in-memory-backend.service.d.ts#L1 try to load the type file for core-js, but it is only a dev dependency, so not present in my project.
If I add this by installing with npm i -D @types/core-js I have a lot more errors, due to conflicts with es2015.core types definition of Typescript.
** NG Live Development Server is running on http://localhost:4200. **
4569ms building modules
34ms sealing
0ms optimizing
0ms basic module optimization
78ms module optimization
1ms advanced module optimization
12ms basic chunk optimization
0ms chunk optimization
3ms advanced chunk optimization
1ms module and chunk tree optimization
127ms module reviving
9ms module order optimization
4ms module id optimization
3ms chunk reviving
0ms chunk order optimization
11ms chunk id optimization
59ms hashing
0ms module assets processing
165ms chunk assets processing
3ms additional chunk assets processing
0ms recording
0ms additional asset processing
1341ms chunk asset optimization
1050ms asset optimization
42ms emitting
Hash: 0f90a2d2ddfcb98dd1e0
Version: webpack 2.1.0-beta.25
Time: 7531ms
Asset Size Chunks Chunk Names
main.bundle.js 3.09 MB 0, 2 [emitted] main
styles.bundle.js 10.7 kB 1, 2 [emitted] styles
inline.js 5.53 kB 2 [emitted] inline
main.map 3.21 MB 0, 2 [emitted] main
styles.map 14.8 kB 1, 2 [emitted] styles
inline.map 5.59 kB 2 [emitted] inline
index.html 485 bytes [emitted]
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:21:13
Duplicate identifier 'PropertyKey'.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:85:4
All declarations of 'name' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:145:4
Subsequent variable declarations must have the same type. Variable '[Symbol.unscopables]' must be of type '{ copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: ...', but here has type 'any'.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:262:4
All declarations of 'flags' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:276:4
All declarations of 'EPSILON' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:311:4
All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:318:4
All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:457:4
Subsequent variable declarations must have the same type. Variable '[Symbol.toStringTag]' must be of type '"Symbol"', but here has type 'string'.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:457:4
All declarations of '[Symbol.toStringTag]' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:464:4
All declarations of 'prototype' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:492:4
All declarations of 'hasInstance' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:498:4
All declarations of 'isConcatSpreadable' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:504:4
All declarations of 'iterator' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:510:4
All declarations of 'match' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:516:4
All declarations of 'replace' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:522:4
All declarations of 'search' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:528:4
All declarations of 'species' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:534:4
All declarations of 'split' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:540:4
All declarations of 'toPrimitive' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:546:4
All declarations of 'toStringTag' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:552:4
All declarations of 'unscopables' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:609:4
Subsequent variable declarations must have the same type. Variable '[Symbol.toStringTag]' must be of type '"Math"', but here has type 'string'.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:609:4
All declarations of '[Symbol.toStringTag]' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:613:4
Subsequent variable declarations must have the same type. Variable '[Symbol.toStringTag]' must be of type '"JSON"', but here has type 'string'.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:613:4
All declarations of '[Symbol.toStringTag]' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:628:4
All declarations of 'size' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:634:4
All declarations of 'prototype' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:645:4
All declarations of 'size' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:651:4
All declarations of 'prototype' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:666:4
All declarations of 'prototype' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:680:4
All declarations of 'prototype' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:692:4
All declarations of 'value' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/@types/core-js/index.d.ts:804:4
All declarations of 'prototype' must have identical modifiers.
ERROR in [default] /Users/kevin/Workspace/Angular2-TourOfHeroes/node_modules/typescript/lib/lib.es2015.core.d.ts:17:13
Duplicate identifier 'PropertyKey'.
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 2.82 kB 0
webpack: bundle is now VALID.
What can we do to suppress this error ?
Thanks ;)
peterblazejewicz, slawojstanislawski and jasonswett
Metadata
Metadata
Assignees
Labels
No labels