Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Error building sample app #470

Closed
alcohen opened this issue Nov 29, 2016 · 13 comments
Closed

Error building sample app #470

alcohen opened this issue Nov 29, 2016 · 13 comments

Comments

@alcohen
Copy link

alcohen commented Nov 29, 2016

I followed Steve Sanderson's very nice article "ASP.NET Core + Angular 2 template for Visual Studio". Everything seems OK, but when I try to run the project it complains and refuses to run (see stack trace below). So I'm filing an issue here as suggested in the article. Thanks!


An unhandled exception occurred while processing the request.

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 (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules\zone.js\dist\zone-node.js:38:23)
at new NgZoneImpl (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules@angular\core\bundles\core.umd.js:6219:18)
at new NgZone (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules@angular\core\bundles\core.umd.js:6368:30)
at PlatformRef_.bootstrapModuleFactoryWithZone (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules@angular\core\bundles\core.umd.js:6913:26)
at PlatformRef
.bootstrapModuleFactory (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules@angular\core\bundles\core.umd.js:6904:25)
at C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules\angular2-platform-node\node-platform.js:439:38
at tryCatch (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules\aspnet-prerendering\node_modules\es6-promise\dist\es6-promise.js:410:12)
at invokeCallback (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules\aspnet-prerendering\node_modules\es6-promise\dist\es6-promise.js:425:13)
at publish (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules\aspnet-prerendering\node_modules\es6-promise\dist\es6-promise.js:393:7)
at flush (C:\Users\Alan\Source\Repos\Angular2ApplicationTest\Angular2ApplicationTest\node_modules\aspnet-prerendering\node_modules\es6-promise\dist\es6-promise.js:121:5)

@nicwillemse
Copy link

Same issue for me, was working previously

@nicwillemse
Copy link

@alcohen, I have gotten around the issue by changing the dependency on Angular services to "1.0.0-beta-000019"

"Microsoft.AspNetCore.AngularServices": "1.0.0-beta-000019"

let me know if you come right ?

@mcgune
Copy link

mcgune commented Nov 29, 2016

Same issue for me

@nicwillemse
Copy link

@mcgune have you tried my solution above ?

@mcgune
Copy link

mcgune commented Nov 29, 2016

Yes, it worked form me.

@ghost
Copy link

ghost commented Nov 29, 2016

Works. Thanks.

@hheexx
Copy link

hheexx commented Nov 29, 2016

You can eather block AngularServices on version 1.0.0-beta-000019 as advised here or apply patches from 28. nov.
https://github.com/aspnet/JavaScriptServices/commits/dev

@nicwillemse
Copy link

@hheexx Im not sure what that link is pointing out ?

@hheexx
Copy link

hheexx commented Nov 29, 2016

commits on this repository

@hheexx
Copy link

hheexx commented Nov 29, 2016

If you want to use AngularServices 1.0.0-beta-000020 or later you have to apply commits from 28.nov to template

@SteveSandersonMS
Copy link
Member

Thanks for reporting this. Will publish a fix shortly.

@nicwillemse
Copy link

thanks @SteveSandersonMS

@SteveSandersonMS
Copy link
Member

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!

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

No branches or pull requests

5 participants