Skip to content

facade/promise.d.ts errors on [email protected] #6468

Closed

Description

@rapropos

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.

Activity

  1. du5rte commented on Jan 21, 2016

    @du5rte

    +1 any idea what's causing it? I had to moved back to 1.7.5

  2. MarkoSulamagi commented on Jan 23, 2016

    @MarkoSulamagi

    +1

  3. josephwoodward commented on Jan 29, 2016

    @josephwoodward

    I appear to be getting the same problem. It was all working fine until I upgraded.

    Here's the contents of my tsconfig file if it helps:

    {
        "compilerOptions": {
        "target": "ES5",
        "module": "system",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false
    },
    "exclude": [
        "node_modules"
        ]
    }
    

    *Edit: After a bit of digging it looks like the Angular team are aware of it: microsoft/TypeScript#6178 (comment)

  4. xiaopengli89 commented on Jan 29, 2016

    @xiaopengli89

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

  5. OClement commented on Jan 29, 2016

    @OClement

    +1
    This needs to be fixed ASAP
    Looks like that file (promise.d.ts) isn't in line with ES6 specs;
    TSC 1.8 aligned themselves with those specs and it now throws that error (it wasn't in 1.7.*)

    We need to use TSC 1.8 for various reasons and it is currently breaking our builds

  6. servicepartnerplatform commented on Jan 29, 2016

    @servicepartnerplatform

    sicaner's solution worked for me!

  7. josephwoodward commented on Jan 30, 2016

    @josephwoodward

    As it's a TypeScript compile warning your Angular 2 application will still transpile and work without any problems, so for the meantime you can also ignore the error instead of editing any of Angular 2's type definition files.

  8. wardbell commented on Jan 30, 2016

    @wardbell
    Contributor

    @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.

  9. ocombe commented on Jan 31, 2016

    @ocombe
    Contributor

    As @wardbell stated this is an error for the typescript compiler, and it exits with status 2 instead of 0, which means that if your typescript compilation is part of a publish/testing process it will fail.
    I need to use TypeScript 1.7.5 until this is fixed and it's a shame because 1.8 introduces modules bundling which I need for my lib.

  10. marcinnajder commented on Feb 1, 2016

    @marcinnajder

    +1

  11. josephwoodward commented on Feb 1, 2016

    @josephwoodward

    Thanks for the clarification @wardbell. My current project isn't being built as part of any CI pipeline so I hadn't thought of this. I agree, this does need to be fixed soon and hopefully it will be.

  12. 61 remaining items

  13. MattDHill commented on Mar 16, 2016

    @MattDHill

    @alexeagle sorry if this is a terribly stupid question, but I am still encountering this same problem. When I check my latest Angular version using "npm angular --version" it says 3.8.1. I know the latest is beta.9. How do I upgrade to beta.9? I can't seem to do it anywhere.

  14. ericmartinezr commented on Mar 16, 2016

    @ericmartinezr
    Contributor

    @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.

  15. alexeagle commented on Mar 16, 2016

    @alexeagle
    Contributor

    right, npm angular is not an npm command, probably you should get an
    error instead.

    On Wed, Mar 16, 2016 at 12:07 PM ericmartinezr [email protected]
    wrote:

    @MattDHill https://github.com/MattDHill do npm install angular2@latest
    --save. The result you get sounds to be npm version itself.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #6468 (comment)

  16. vukasin-nikodijevic commented on Mar 29, 2016

    @vukasin-nikodijevic

    Still issue in [email protected]

  17. alexeagle commented on Mar 29, 2016

    @alexeagle
    Contributor

    @Vukasin0 doesn't matter what version of TypeScript, any 1.8 branch will have this problem unless you update angular2 past beta.7

  18. nicobytes commented on Apr 5, 2016

    @nicobytes
    Contributor

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

  19. mikepc commented on Apr 7, 2016

    @mikepc

    npm install --save [email protected] [email protected] [email protected]

    This successfully builds and runs without this error, but I haven't run a full regression on it or anything, but it seems to be working for me.

  20. russellf9 commented on Apr 14, 2016

    @russellf9

    Working from the latest development build:

    npm i typescript@next -D

  21. AdrienTorris commented on Apr 20, 2016

    @AdrienTorris

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

  22. AdrienTorris commented on Apr 20, 2016

    @AdrienTorris
  23. Huthaifah-kholi commented on Nov 28, 2016

    @Huthaifah-kholi

    it solve for me after doing this commands :

    1. typescript@next which update typescript.
    2. adding declare var Promise: PromiseConstructor; on the top of promise.d.ts file on your project.
      this solution come to me from the previous comments on this issue. thanks to all
  24. malutanpetronel commented on May 22, 2017

    @malutanpetronel

    A bit redundant ? It should be re-changed if you will run again npm install to add some other packages ?

  25. usernamealreadyis commented on May 29, 2017

    @usernamealreadyis

    invalid link #17071 @x-friday

  26. angular-automatic-lock-bot commented on Sep 11, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  27. locked and limited conversation to collaborators on Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions