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

Error building sample app #470

Closed
Closed

Description

@alcohen

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)

Activity

  1. nicwillemse commented on Nov 29, 2016

    @nicwillemse

    Same issue for me, was working previously

  2. nicwillemse commented on Nov 29, 2016

    @nicwillemse

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

  3. mcgune commented on Nov 29, 2016

    @mcgune

    Same issue for me

  4. nicwillemse commented on Nov 29, 2016

    @nicwillemse

    @mcgune have you tried my solution above ?

  5. mcgune commented on Nov 29, 2016

    @mcgune

    Yes, it worked form me.

  6. hheexx commented on Nov 29, 2016

    @hheexx

    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

  7. nicwillemse commented on Nov 29, 2016

    @nicwillemse

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

  8. hheexx commented on Nov 29, 2016

    @hheexx

    commits on this repository

  9. hheexx commented on Nov 29, 2016

    @hheexx

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

  10. SteveSandersonMS commented on Nov 29, 2016

    @SteveSandersonMS
    Member

    Thanks for reporting this. Will publish a fix shortly.

  11. nicwillemse commented on Nov 29, 2016

    @nicwillemse
  12. SteveSandersonMS commented on Nov 29, 2016

    @SteveSandersonMS
    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!

  13. added 2 commits that reference this issue on Nov 29, 2016
    28b8136
    a8d3eed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions