Ionic-framework: Error: node_modules/@types/es6-promise/index.d.ts(11,15): error TS2300: Duplicate identifier 'Promise'.

Created on 4 Oct 2016  路  4Comments  路  Source: ionic-team/ionic-framework

Hi everyone,
I tried to update my project with Ionic2 RC0. I choose the way creating a new Ionic 2 project and copying my project files to it. What can I do to solve this ?

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS:
Node Version: v6.7.0
[email protected]

reply

Most helpful comment

Oh, you don't need the @types/es6-promise stuff. Typescript is providing that via the lib option in the tsconfig.json.

Closing this issue for now.

Thanks,
Dan

All 4 comments

What does your tsconfig look like? Are you still using typings? You are getting a collision of types. It should not happen if you started with a fresh project.

Thanks,
Dan

danbucholtz, Hi.

tsconfig
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"target": "es5"
},
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}

Can you start a new project and keep running ionic serve between each step until you identify where you're getting the collision? I'm not sure what is going on with your project, but it is very likely a library you're importing or something. Are you importing es6-shim or es6-promise` or anything like that?

Thanks,
Dan

Oh, you don't need the @types/es6-promise stuff. Typescript is providing that via the lib option in the tsconfig.json.

Closing this issue for now.

Thanks,
Dan

Was this page helpful?
0 / 5 - 0 ratings