JavaScriptServices icon indicating copy to clipboard operation
JavaScriptServices copied to clipboard

Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten

Open aarndt opened this issue 10 years ago • 3 comments

I have an existing project that was working up until last week. I now get this error:

Exception: Call to Node module failed with error: Error: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.) at Function.Zone.assertZonePatched

To make sure that the issue was not due to a code/package change on my end, I took the following steps to reproduce the issue

  1. Create a new project using the .NET Core/Angular2 template
  2. dotnet restore
  3. npm install
  4. dotnet run
  5. Error is shown

This has us completely blocked. Any help would be appreciated.

aarndt avatar Nov 29 '16 16:11 aarndt

Thanks for reporting this and the clear repro instructions!

We'll publish a fix very shortly. In the meantime (like, next few hours) if you need you can work around it using the instructions at https://github.com/aspnet/JavaScriptServices/issues/470.

Closing this as a duplicate of #470.

SteveSandersonMS avatar Nov 29 '16 16:11 SteveSandersonMS

The fix is live now. Please update to version 1.0.0-beta-0000021 (or just go back to specifying 1.0.0-* but make sure it fetches the latest).

If you still get any issues please let me know!

SteveSandersonMS avatar Nov 29 '16 18:11 SteveSandersonMS

Hi

I am facing the same issue, any work around???

Regards, PRabhu

prabhurangan avatar Feb 24 '17 22:02 prabhurangan