Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

build error with duplicate identifier Promise #41

Closed
Gabriel0402 opened this issue Oct 21, 2015 · 2 comments
Closed

build error with duplicate identifier Promise #41

Gabriel0402 opened this issue Oct 21, 2015 · 2 comments
Assignees
Labels

Comments

@Gabriel0402
Copy link

When I use gulp build there's Duplicate identifier 'Promise' error in es6-promise.d.ts and es6-shim.d.ts files. And I checked the target is ES5 in tsconfig. Is there anything I can do to resolve this error? And my dev box is Windows 10. Thanks!

@bertrandk
Copy link
Member

es6-shim came in after es6-promise, we can probably remove the latter.

/cc @igor-ka

@igor-ka
Copy link

igor-ka commented Oct 23, 2015

Hey @Gabriel0402 the issues is somewhat artificial and is purely related to typings. Angular 2 typings depend on es6-shim typing file, which among several things defines the interface of ES6 Promise. On the the hand the typings for Chrome Extension runtime (which we also use), depends on es6-promise typing, which defines the same interface for Promise, hence the duplication errors. I am trying to think of a clever way of getting rid of this error while still keeping the typings for compile time checking of both Angular 2 and Chrome Runtime, and the only thing that comes to my mind is to literally change the dependency to es6-shim typings file from Chrome Runtime typing, and commit that file. This is not a very "clean" approach is, but I will do more investigating on this.

It's a good idea to keep this issue open and I can look into different alternatives to resolving this. In the meantime, I would say that it is safe to ignore those specific errors during build.

Let me know if you have some ideas on how to resolve this and thanks for your feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants