clbond / ng2-redux-form

Connect Angular 2 forms to Redux stores
17 stars 7 forks source link

Errors on npm install because of including @types/core-js #15

Closed Redigast13 closed 7 years ago

Redigast13 commented 7 years ago

npm i ng2-redux-form outputs errors:

> tsc

../@types/core-js/index.d.ts(21,14): error TS2300: Duplicate identifier 'PropertyKey'.
../@types/core-js/index.d.ts(85,5): error TS2687: All declarations of 'name' must have identical modifiers.
../@types/core-js/index.d.ts(145,5): error TS2403: 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'.
../@types/core-js/index.d.ts(262,5): error TS2687: All declarations of 'flags' must have identical modifiers.
../@types/core-js/index.d.ts(276,5): error TS2687: All declarations of 'EPSILON' must have identical modifiers.
../@types/core-js/index.d.ts(311,5): error TS2687: All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers.
../@types/core-js/index.d.ts(318,5): error TS2687: All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers.
../@types/core-js/index.d.ts(457,5): error TS2403: Subsequent variable declarations must have the same type.  Variable '[Symbol.toStringTag]' must be of type '"Symbol"', but here has type 'string'.
../@types/core-js/index.d.ts(457,5): error TS2687: All declarations of '[Symbol.toStringTag]' must have identical modifiers.
../@types/core-js/index.d.ts(464,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
../@types/core-js/index.d.ts(492,5): error TS2687: All declarations of 'hasInstance' must have identical modifiers.
../@types/core-js/index.d.ts(498,5): error TS2687: All declarations of 'isConcatSpreadable' must have identical modifiers.
../@types/core-js/index.d.ts(504,5): error TS2687: All declarations of 'iterator' must have identical modifiers.
../@types/core-js/index.d.ts(510,5): error TS2687: All declarations of 'match' must have identical modifiers.
../@types/core-js/index.d.ts(516,5): error TS2687: All declarations of 'replace' must have identical modifiers.
../@types/core-js/index.d.ts(522,5): error TS2687: All declarations of 'search'must have identical modifiers.
../@types/core-js/index.d.ts(528,5): error TS2687: All declarations of 'species' must have identical modifiers.
../@types/core-js/index.d.ts(534,5): error TS2687: All declarations of 'split' must have identical modifiers.
../@types/core-js/index.d.ts(540,5): error TS2687: All declarations of 'toPrimitive' must have identical modifiers.
../@types/core-js/index.d.ts(546,5): error TS2687: All declarations of 'toStringTag' must have identical modifiers.
../@types/core-js/index.d.ts(552,5): error TS2687: All declarations of 'unscopables' must have identical modifiers.
../@types/core-js/index.d.ts(609,5): error TS2403: Subsequent variable declarations must have the same type.  Variable '[Symbol.toStringTag]' must be of type '"
Math"', but here has type 'string'.
../@types/core-js/index.d.ts(609,5): error TS2687: All declarations of '[Symbol.toStringTag]' must have identical modifiers.
../@types/core-js/index.d.ts(613,5): error TS2403: Subsequent variable declarations must have the same type.  Variable '[Symbol.toStringTag]' must be of type '"
JSON"', but here has type 'string'.
../@types/core-js/index.d.ts(613,5): error TS2687: All declarations of '[Symbol.toStringTag]' must have identical modifiers.
../@types/core-js/index.d.ts(628,5): error TS2687: All declarations of 'size' must have identical modifiers.
../@types/core-js/index.d.ts(634,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
../@types/core-js/index.d.ts(645,5): error TS2687: All declarations of 'size' must have identical modifiers.
../@types/core-js/index.d.ts(651,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
../@types/core-js/index.d.ts(666,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
../@types/core-js/index.d.ts(680,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
../@types/core-js/index.d.ts(692,5): error TS2687: All declarations of 'value' must have identical modifiers.
../@types/core-js/index.d.ts(804,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
../typescript/lib/lib.es2015.core.d.ts(17,14): error TS2300: Duplicate identifier 'PropertyKey'.

I think that this happens because I already have the @types/core-js module and ng2-redux-form injects this module too. So, if I want to install ng2-redux-form I should do this:

  1. remove @types/core-js folder
  2. run npm i ng2-redux-form (it executed without errors)
  3. restore @types/core-js folder
clbond commented 7 years ago

No, you shouldn't have to do that. I will tighten up the types list in tsconfig.json and hopefully that will resolve your issue. Is your code public?

clbond commented 7 years ago

Can you try now?

Redigast13 commented 7 years ago

No, you shouldn't have to do that. I will tighten up the types list in tsconfig.json and hopefully that will resolve your issue. Is your code public?

I tried this in this project

Can you try now?

Now it's ok! Thank you very much!