New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

facade/promise.d.ts errors on typescript@1.8.0 #6468

Closed
rapropos opened this Issue Jan 13, 2016 · 55 comments

Comments

Projects
None yet
@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.
@du5rte

This comment has been minimized.

Show comment
Hide comment
@du5rte

du5rte Jan 21, 2016

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

du5rte commented Jan 21, 2016

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

@MarkoSulamagi

This comment has been minimized.

Show comment
Hide comment
@JosephWoodward

This comment has been minimized.

Show comment
Hide comment
@JosephWoodward

JosephWoodward Jan 29, 2016

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)

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)

@x-friday

This comment has been minimized.

Show comment
Hide comment
@x-friday

x-friday Jan 29, 2016

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

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

@OClement

This comment has been minimized.

Show comment
Hide comment
@OClement

OClement Jan 29, 2016

+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

+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

@fripp0971

This comment has been minimized.

Show comment
Hide comment
@fripp0971

fripp0971 Jan 29, 2016

sicaner's solution worked for me!

sicaner's solution worked for me!

@JosephWoodward

This comment has been minimized.

Show comment
Hide comment
@JosephWoodward

JosephWoodward Jan 30, 2016

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.

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.

@wardbell

This comment has been minimized.

Show comment
Hide comment
@wardbell

wardbell Jan 30, 2016

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.

Contributor

wardbell commented Jan 30, 2016

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

@ocombe

This comment has been minimized.

Show comment
Hide comment
@ocombe

ocombe Jan 31, 2016

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.

Contributor

ocombe commented Jan 31, 2016

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.

@marcinnajder

This comment has been minimized.

Show comment
Hide comment

+1

@JosephWoodward

This comment has been minimized.

Show comment
Hide comment
@JosephWoodward

JosephWoodward Feb 1, 2016

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.

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.

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Feb 1, 2016

Collaborator

Yes we need a typescript@next build of angular2 on travis so we keep it compile-clean.

Dupe of #6368

Collaborator

alexeagle commented Feb 1, 2016

Yes we need a typescript@next build of angular2 on travis so we keep it compile-clean.

Dupe of #6368

@Meligy

This comment has been minimized.

Show comment
Hide comment
@Meligy

Meligy Feb 2, 2016

Contributor

@alexeagle It's awesome to have a build to find issues like this. THANKS (for a lot of stuff actually, to all Angular team).

But as #6368 is about creating a build against typescript@next, which would definitely help identify issues like this current one, it's still not the same issue, and not the only way to investigate it as well.

Any chance of taking this issue as a request to apply the workaround mentioned in #6468 (comment) ? Seems pretty simple.

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

Contributor

Meligy commented Feb 2, 2016

@alexeagle It's awesome to have a build to find issues like this. THANKS (for a lot of stuff actually, to all Angular team).

But as #6368 is about creating a build against typescript@next, which would definitely help identify issues like this current one, it's still not the same issue, and not the only way to investigate it as well.

Any chance of taking this issue as a request to apply the workaround mentioned in #6468 (comment) ? Seems pretty simple.

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

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Feb 2, 2016

Collaborator

okay let's keep this open to confirm it's fixed or be sure we have a typings test that prevents regressions.

Collaborator

alexeagle commented Feb 2, 2016

okay let's keep this open to confirm it's fixed or be sure we have a typings test that prevents regressions.

@alexeagle alexeagle reopened this Feb 2, 2016

@alexeagle alexeagle self-assigned this Feb 2, 2016

@born2net

This comment has been minimized.

Show comment
Hide comment
@born2net

born2net Feb 4, 2016

+1 please fix

born2net commented Feb 4, 2016

+1 please fix

@maissani

This comment has been minimized.

Show comment
Hide comment
@maissani

maissani Feb 5, 2016

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

maissani commented Feb 5, 2016

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

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Feb 5, 2016

Collaborator

I'm working on it now - have a repro failure on travis: https://travis-ci.org/angular/angular/jobs/107134306

Collaborator

alexeagle commented Feb 5, 2016

I'm working on it now - have a repro failure on travis: https://travis-ci.org/angular/angular/jobs/107134306

@playground

This comment has been minimized.

Show comment
Hide comment

+1

alexeagle added a commit to dart-archive/ts2dart that referenced this issue Feb 7, 2016

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 7, 2016

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 7, 2016

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 7, 2016

fix(typing): Remove re-export of the Promise built-in type.
Instead, ts2dart can add the 'dart:async' import whenever
Promise is used.

Fixes #6468

alexeagle added a commit to dart-archive/ts2dart that referenced this issue Feb 8, 2016

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 8, 2016

fix(typing): Remove re-export of the Promise built-in type.
Instead, ts2dart can add the 'dart:async' import whenever
Promise is used.

Fixes #6468

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 8, 2016

fix(typing): Remove re-export of the Promise built-in type.
Instead, ts2dart can add the 'dart:async' import whenever
Promise is used.

Fixes #6468

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 8, 2016

fix(typing): Remove re-export of the Promise built-in type.
Instead, ts2dart can add the 'dart:async' import whenever
Promise is used.

Fixes #6468

alexeagle added a commit to alexeagle/angular that referenced this issue Feb 8, 2016

fix(typing): Remove re-export of the Promise built-in type.
Instead, ts2dart can add the 'dart:async' import whenever
Promise is used.

Fixes #6468
@Meligy

This comment has been minimized.

Show comment
Hide comment
@Meligy

Meligy Feb 23, 2016

Contributor

Um. I just got the 2.0.0-beta.7 version from NPM and it seems to have the same issue.

I used the angular-cli tool to generate a new app, and regardless of how unstable the tool may be, it got me the correct angular2 version above, but when I go to the src folder and run tsc I get:

~/Code/misc/sample/src (master ✘)✖✹✭ ᐅ tsc                      
../node_modules/angular2/src/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module.
../node_modules/angular2/src/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module.

The file mentioned in the error looks as follows:

export { Promise };
export interface PromiseCompleter<R> {
    promise: Promise<R>;
    resolve: (value?: R | PromiseLike<R>) => void;
    reject: (error?: any, stackTrace?: string) => void;
}
export declare class PromiseWrapper {
    static resolve<T>(obj: T): Promise<T>;
    static reject(obj: any, _: any): Promise<any>;
    static catchError<T>(promise: Promise<T>, onError: (error: any) => T | PromiseLike<T>): Promise<T>;
    static all(promises: any[]): Promise<any>;
    static then<T, U>(promise: Promise<T>, success: (value: T) => U | PromiseLike<U>, rejection?: (error: any, stack?: any) => U | PromiseLike<U>): Promise<U>;
    static wrap<T>(computation: () => T): Promise<T>;
    static scheduleMicrotask(computation: () => any): void;
    static isPromise(obj: any): boolean;
    static completer(): PromiseCompleter<any>;
}

With the original line in there,export { Promise };, that is breaking the compiler I guess.

Contributor

Meligy commented Feb 23, 2016

Um. I just got the 2.0.0-beta.7 version from NPM and it seems to have the same issue.

I used the angular-cli tool to generate a new app, and regardless of how unstable the tool may be, it got me the correct angular2 version above, but when I go to the src folder and run tsc I get:

~/Code/misc/sample/src (master ✘)✖✹✭ ᐅ tsc                      
../node_modules/angular2/src/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module.
../node_modules/angular2/src/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module.

The file mentioned in the error looks as follows:

export { Promise };
export interface PromiseCompleter<R> {
    promise: Promise<R>;
    resolve: (value?: R | PromiseLike<R>) => void;
    reject: (error?: any, stackTrace?: string) => void;
}
export declare class PromiseWrapper {
    static resolve<T>(obj: T): Promise<T>;
    static reject(obj: any, _: any): Promise<any>;
    static catchError<T>(promise: Promise<T>, onError: (error: any) => T | PromiseLike<T>): Promise<T>;
    static all(promises: any[]): Promise<any>;
    static then<T, U>(promise: Promise<T>, success: (value: T) => U | PromiseLike<U>, rejection?: (error: any, stack?: any) => U | PromiseLike<U>): Promise<U>;
    static wrap<T>(computation: () => T): Promise<T>;
    static scheduleMicrotask(computation: () => any): void;
    static isPromise(obj: any): boolean;
    static completer(): PromiseCompleter<any>;
}

With the original line in there,export { Promise };, that is breaking the compiler I guess.

@Meligy

This comment has been minimized.

Show comment
Hide comment
@Meligy

Meligy Feb 23, 2016

Contributor
Contributor

Meligy commented Feb 23, 2016

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Feb 24, 2016

Collaborator

Typescript@next is 1.9 and that Travis failure is a known issue (our build
system was broken by behavior change inside tsc). Not related.

If you have a file containing export {Promise} then it's not beta.7

On Tue, Feb 23, 2016, 3:59 PM @Meligy From GuruStop.NET <
notifications@github.com> wrote:

There is also still a failure against typescript@next for beta7 !!
https://travis-ci.org/angular/angular/builds/110239034
https://travis-ci.org/angular/angular/jobs/110239044


Reply to this email directly or view it on GitHub
#6468 (comment).

Collaborator

alexeagle commented Feb 24, 2016

Typescript@next is 1.9 and that Travis failure is a known issue (our build
system was broken by behavior change inside tsc). Not related.

If you have a file containing export {Promise} then it's not beta.7

On Tue, Feb 23, 2016, 3:59 PM @Meligy From GuruStop.NET <
notifications@github.com> wrote:

There is also still a failure against typescript@next for beta7 !!
https://travis-ci.org/angular/angular/builds/110239034
https://travis-ci.org/angular/angular/jobs/110239044


Reply to this email directly or view it on GitHub
#6468 (comment).

@afirdousi

This comment has been minimized.

Show comment
Hide comment
@afirdousi

afirdousi Feb 25, 2016

Still facing the issue . I am on 2.0.0-beta.3. Any workaround that makes sense ?

Still facing the issue . I am on 2.0.0-beta.3. Any workaround that makes sense ?

@mishoboss

This comment has been minimized.

Show comment
Hide comment
@mishoboss

mishoboss Feb 25, 2016

Seems 2.0.0-beta.7 still has the issue.

Seems 2.0.0-beta.7 still has the issue.

@afirdousi

This comment has been minimized.

Show comment
Hide comment
@afirdousi

afirdousi Feb 25, 2016

If I add the following to node_modules/angular2/src/facade/promise.d.ts

declare var Promise: PromiseConstructor;

The error goes away at compilation but when i navigate to the app in browser it shows

Uncaught reflect-metadata shim is required when using class decorators

So I went ahead and added the following in main.ts where i call Angular's bootstrap()

import  "reflect-metadata"; 

This made the application works, at least it compiles but still it yells on the console:

Uncaught TypeError: Cannot assign to read only property 'length' of function Map() {
            this._keys = [];
            this._values = [];
            this._cache = exports.cacheSentinel;
        }

So the main view works, basic routing works but Services injected in Component are not working. For example. a simple service that returns a string/JSON/whatever. I tried consoling in service constructor, it never reaches that code so I am assuming the injectable service is never instantiated.

Anyone ?
(Also making changes to promise.d.ts is one crazy idea because i don't want to ask my team to go and make changes to node_modules after they fork and do npm install)

P.S.
My environment,
Angular : 2.0.0-beta.3
TSC : 1.8.2

If I add the following to node_modules/angular2/src/facade/promise.d.ts

declare var Promise: PromiseConstructor;

The error goes away at compilation but when i navigate to the app in browser it shows

Uncaught reflect-metadata shim is required when using class decorators

So I went ahead and added the following in main.ts where i call Angular's bootstrap()

import  "reflect-metadata"; 

This made the application works, at least it compiles but still it yells on the console:

Uncaught TypeError: Cannot assign to read only property 'length' of function Map() {
            this._keys = [];
            this._values = [];
            this._cache = exports.cacheSentinel;
        }

So the main view works, basic routing works but Services injected in Component are not working. For example. a simple service that returns a string/JSON/whatever. I tried consoling in service constructor, it never reaches that code so I am assuming the injectable service is never instantiated.

Anyone ?
(Also making changes to promise.d.ts is one crazy idea because i don't want to ask my team to go and make changes to node_modules after they fork and do npm install)

P.S.
My environment,
Angular : 2.0.0-beta.3
TSC : 1.8.2

@afirdousi

This comment has been minimized.

Show comment
Hide comment
@afirdousi

afirdousi Feb 25, 2016

I downgraded to tsc:1.7.5 and it works great. So for now, if you want to distribute your project with package.json, make sure you don't point to typescript 1.8. tsc 1.7.5 works great with Angular 2.0.0-beta.3.

DONT : "typescript": "^1.7.5"
DONT : "typescript": "1.8"
DO : "typescript": "1.7.5"

I downgraded to tsc:1.7.5 and it works great. So for now, if you want to distribute your project with package.json, make sure you don't point to typescript 1.8. tsc 1.7.5 works great with Angular 2.0.0-beta.3.

DONT : "typescript": "^1.7.5"
DONT : "typescript": "1.8"
DO : "typescript": "1.7.5"

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Feb 25, 2016

Collaborator

TypeScript 1.8 support was introduced with beta.7

Earlier angular2 indeed requires TS 1.7

On Thu, Feb 25, 2016 at 6:45 AM Anas Raza Firdousi notifications@github.com
wrote:

I downgraded to tsc:1.7.5 and it works great. So for now, if you want to
distribute your project with package.json, make sure you don't point to
typescript 1.8. tsc 1.7.5 works great with Angular 2.0.0-beta.3.

DONT : "typescript": "^1.7.5"
DONT : "typescript": "1.8"
DO : "typescript": "1.7.5"


Reply to this email directly or view it on GitHub
#6468 (comment).

Collaborator

alexeagle commented Feb 25, 2016

TypeScript 1.8 support was introduced with beta.7

Earlier angular2 indeed requires TS 1.7

On Thu, Feb 25, 2016 at 6:45 AM Anas Raza Firdousi notifications@github.com
wrote:

I downgraded to tsc:1.7.5 and it works great. So for now, if you want to
distribute your project with package.json, make sure you don't point to
typescript 1.8. tsc 1.7.5 works great with Angular 2.0.0-beta.3.

DONT : "typescript": "^1.7.5"
DONT : "typescript": "1.8"
DO : "typescript": "1.7.5"


Reply to this email directly or view it on GitHub
#6468 (comment).

@electricBonfire

This comment has been minimized.

Show comment
Hide comment
@electricBonfire

electricBonfire Feb 25, 2016

I am getting the same error. I am confused to why this error is appearing. I have excluded node_modules but it appears that typescript is still looking in the node_modules?

I am getting the same error. I am confused to why this error is appearing. I have excluded node_modules but it appears that typescript is still looking in the node_modules?

@Meligy

This comment has been minimized.

Show comment
Hide comment
@Meligy

Meligy Feb 25, 2016

Contributor

@alexeagle That's correct. I was running npm show angular2 version thinking it'd show me the local one and it showed beta7. Should have verified better. Sorry for the noise.

For those having similar issues, it could be something completely different. In my case, it was angular-cli actually bringing beta6. @shawn-northrop TypeScript will follow your imports.

Contributor

Meligy commented Feb 25, 2016

@alexeagle That's correct. I was running npm show angular2 version thinking it'd show me the local one and it showed beta7. Should have verified better. Sorry for the noise.

For those having similar issues, it could be something completely different. In my case, it was angular-cli actually bringing beta6. @shawn-northrop TypeScript will follow your imports.

@vanishs

This comment has been minimized.

Show comment
Hide comment
@kanishk02

This comment has been minimized.

Show comment
Hide comment
@kanishk02

kanishk02 Mar 1, 2016

placing declare var Promise: PromiseConstructor; on the top of promise.d.ts will work

placing declare var Promise: PromiseConstructor; on the top of promise.d.ts will work

@lathonez

This comment has been minimized.

Show comment
Hide comment
@lathonez

lathonez Mar 4, 2016

beta.7 upgrade fixed for me, thanks.

lathonez commented Mar 4, 2016

beta.7 upgrade fixed for me, thanks.

@ChrisGrigg

This comment has been minimized.

Show comment
Hide comment
@ChrisGrigg

ChrisGrigg Mar 8, 2016

I'm on 2.0.0-beta.8 and I'm seeing this issue, any fix coming up for this?

I'm on 2.0.0-beta.8 and I'm seeing this issue, any fix coming up for this?

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Mar 9, 2016

Collaborator

If you still have this error, please give some steps to repro. You probably
don't have beta.8.

On Tue, Mar 8, 2016 at 3:48 PM Christopher Grigg notifications@github.com
wrote:

I'm on 2.0.0-beta.8 and I'm seeing this issue, any fix coming up for this?


Reply to this email directly or view it on GitHub
#6468 (comment).

Collaborator

alexeagle commented Mar 9, 2016

If you still have this error, please give some steps to repro. You probably
don't have beta.8.

On Tue, Mar 8, 2016 at 3:48 PM Christopher Grigg notifications@github.com
wrote:

I'm on 2.0.0-beta.8 and I'm seeing this issue, any fix coming up for this?


Reply to this email directly or view it on GitHub
#6468 (comment).

@ChrisGrigg

This comment has been minimized.

Show comment
Hide comment
@ChrisGrigg

ChrisGrigg Mar 9, 2016

Fixed. Apologies, I got caught out by "npm show angular2 version" which shows the latest available module rather than what I should have done "npm angular --version".

Thanks

Fixed. Apologies, I got caught out by "npm show angular2 version" which shows the latest available module rather than what I should have done "npm angular --version".

Thanks

@molekilla

This comment has been minimized.

Show comment
Hide comment
@molekilla

molekilla Mar 10, 2016

hi all,

I found this in the changelog and it worked for me

2.0.0-beta.6 (2016-02-11)
BREAKING CHANGES

Transitive typings are no longer included in the distribution.

If you use --target=es5, you will need to add a line somewhere in your application (for example, at the top of the .ts file where you call bootstrap):

///<reference path="node_modules/angular2/typings/browser.d.ts"/>

I wonder if it has been updated in the documentation.

Regards

hi all,

I found this in the changelog and it worked for me

2.0.0-beta.6 (2016-02-11)
BREAKING CHANGES

Transitive typings are no longer included in the distribution.

If you use --target=es5, you will need to add a line somewhere in your application (for example, at the top of the .ts file where you call bootstrap):

///<reference path="node_modules/angular2/typings/browser.d.ts"/>

I wonder if it has been updated in the documentation.

Regards

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Mar 10, 2016

Collaborator

@molekilla that's not this issue. For Cannot re-export name that is not defined in the module. the solution is to downgrade TS to 1.7 or upgrade angular2 to beta.7+

Your solution is for missing typings.

Collaborator

alexeagle commented Mar 10, 2016

@molekilla that's not this issue. For Cannot re-export name that is not defined in the module. the solution is to downgrade TS to 1.7 or upgrade angular2 to beta.7+

Your solution is for missing typings.

@molekilla

This comment has been minimized.

Show comment
Hide comment
@molekilla

molekilla Mar 10, 2016

I probly got confused, I'd try different versions of typescript/angular, seems on my end was the missing typings. thanks

I probly got confused, I'd try different versions of typescript/angular, seems on my end was the missing typings. thanks

@MattDHill

This comment has been minimized.

Show comment
Hide comment
@MattDHill

MattDHill Mar 16, 2016

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

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

@ericmartinezr

This comment has been minimized.

Show comment
Hide comment
@ericmartinezr

ericmartinezr Mar 16, 2016

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.

Contributor

ericmartinezr commented Mar 16, 2016

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

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Mar 16, 2016

Collaborator

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 notifications@github.com
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)

Collaborator

alexeagle commented Mar 16, 2016

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 notifications@github.com
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)

@vukasin-nikodijevic

This comment has been minimized.

Show comment
Hide comment
@vukasin-nikodijevic

vukasin-nikodijevic Mar 29, 2016

Still issue in typescript@1.8.9

Still issue in typescript@1.8.9

@alexeagle

This comment has been minimized.

Show comment
Hide comment
@alexeagle

alexeagle Mar 29, 2016

Collaborator

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

Collaborator

alexeagle commented Mar 29, 2016

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

@nicobytes

This comment has been minimized.

Show comment
Hide comment
@nicobytes

nicobytes Apr 5, 2016

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

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

@mikepc

This comment has been minimized.

Show comment
Hide comment
@mikepc

mikepc Apr 7, 2016

npm install --save zone.js@0.5.15 rxjs@5.0.0-beta.2 angular2@2.0.0-beta.7

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.

mikepc commented Apr 7, 2016

npm install --save zone.js@0.5.15 rxjs@5.0.0-beta.2 angular2@2.0.0-beta.7

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.

@russellf9

This comment has been minimized.

Show comment
Hide comment
@russellf9

russellf9 Apr 14, 2016

Working from the latest development build:

npm i typescript@next -D

Working from the latest development build:

npm i typescript@next -D

@AdrienTorris

This comment has been minimized.

Show comment
Hide comment
@AdrienTorris

AdrienTorris Apr 20, 2016

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

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

@AdrienTorris

This comment has been minimized.

Show comment
Hide comment
@Huthaifah-kholi

This comment has been minimized.

Show comment
Hide comment
@Huthaifah-kholi

Huthaifah-kholi Nov 28, 2016

it solve for me after doing this commands :

  1. typescript@next which update typescript.
  2. adding declarevar 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

it solve for me after doing this commands :

  1. typescript@next which update typescript.
  2. adding declarevar 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
@malutanpetronel

This comment has been minimized.

Show comment
Hide comment
@malutanpetronel

malutanpetronel May 22, 2017

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment