Massive problems with typings after upgrade to RC0


#1
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:6:14: Duplicate identifier 'PropertyKey'.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:10:5: All declarations of 'value' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:248:5: All declarations of 'EPSILON' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:283:5: All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:290:5: All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:346:5: All declarations of 'flags' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:498:5: All declarations of 'prototype' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:561:5: All declarations of 'size' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:570:5: All declarations of 'prototype' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:581:5: All declarations of 'size' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:591:5: All declarations of 'prototype' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:606:5: All declarations of 'prototype' must have identical modifiers.
Error at /Users/tyrion/devel/saveup-front/node_modules/@types/es6-shim/index.d.ts:620:5: All declarations of 'prototype' must have identical modifiers.
    at check (/Users/tyrion/devel/saveup-front/node_modules/@angular/tsc-wrapped/src/tsc.js:31:15)

Help!


#2

Same issue here on ionic serve.


#3

Looks like your using (npm) types instead of typings, follow the instructions to upgrade to rc 1(mainly a tooling update). Then delete typings folder and typings.json. you just currently have 2 things providing typing info and you should just have one.


#4

I resolved my issue.

  1. Use tsconfig from ionic team (see upgrade log)

  2. comment maybe out “lib”: […] and all in the array

  3. target es5 and module es6 helped

    // “lib”: [
    // “dom”,
    // “es2015”
    // ],
    “module”: “es2015”,
    “moduleResolution”: “node”,
    “target”: “es5”,
    “module”: “es6”,
    “types” : [“core-js”]

  4. Remove typescript and use npm only.

  5. Orient yourself on the pre-made project by ionic team

Post your progress and we will help.


#5

You should check if you need es6-shim types at all, it’s not present in my projects.


#6

Deleting Typings folder resolved this specifc issue.
But now, my third party libraries stopped working.


#7

That is to be expected, as written in Ionic Upgrade Log. You need to use index.html for your library and declare like in Ionic Example Project in declarations.d.ts file.

If that does not help for your library, it might be incompatible with roll-up. You need to configure rollup.config.js. See here for how to do it, also we compiled a Google Doc about Libraries’ compatibility to RollUp: RC0 - library dependency export (jwt-angular2, js-base64)


#8

I discovered that it is related to app-script 0.0.31 and up.
At 0.0.30 my library used to work with declarations.d.ts file and importing by script tag.

But now, even with script ( that is the last resort ), the project isn’t working anymore.


#9

Use Ionic Example Project and migrate your project into theirs. Step by Step.


#10

Yes. I did it. But unfortunately I copied the typings folder too. And this is the reason of the problems of massive problems with typings.

My problem with is another issue. Thank you @nottinhill


#11

Like I said, to tackle my problems and they were vast and plentyful, I followed as strictly as possible the working Ionic2 RC0 example. It is not perfect and had errors too, but at least it did compile and render in Browser.