angular: facade/promise.d.ts errors on typescript@1.8.0

This commit to TypeScript seems to have caused problems on the first line of promise.d.ts complaining that Promise cannot be exported as it is not defined in this file:

ERROR in [default] /path/to/project/node_modules/angular2/src/facade/promise.d.ts:1:9
Cannot re-export name that is not defined in the module.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 58 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I solve this problem by adding declare var Promise: PromiseConstructor; on the top of promise.d.ts

Same issue with typescript 1.7.1, angular 2.0.0-beta1 et rxjs 5.0.0-beta.1, solved with @sicaner’s solution.

I have the same error, What is solution? screenshot from 2016-04-05 18-54-36

@MattDHill do npm install angular2@latest --save. The result you get sounds to be npm version itself. After you do that you can see in package.json the version installed.

@JosephWoodward I wish that TS compiler distinguished “real” errors from mere warnings.

 node_modules/angular2/src/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module.

It doesn’t. This bombs the CI process. Needs to be fixed and soon.