Webpacker: Webpacker with Angular 4 Problem - Uncaught Error: Zone already loaded.

Created on 13 Jun 2017  路  9Comments  路  Source: rails/webpacker

Hi,

Currently, I'm using webpacker with Rails to use AngularV4 in my website.
In the homepage, I include a pack: ng_toppage.js.
My homepage URL is: /index, when it has /index/# and click on button back of browser, the error has appeared.
image
Please help me!
Regards.

All 9 comments

Are you loading zone.js twice? Probably related to this - https://github.com/angular/zone.js/issues/405

@gauravtiwari Thanks for your help, I have used Common Chunks and fixed the problem!

@ncnthuy Yepp that's good way to solve vendor lib duplication 馃憤

@ncnthuy Hi, Can you please help me out how you managed to fix your issue ?

@pankajhirway for me in my test.ts file I had set up I was doing import 'zone.js/dist/zone' and that was causing my error

Removing that import worked...

This is the problem of new firebase update, here is a solution for this error

* Step: 1* Install the lower version of firebase using this command

npm install [email protected]

* Step: 2*

npm install

Try.

Not working any solution provided. Please help someone.

  1. remove 'import 'zone.js/dist/zone' in your test.ts. If that does not solve the problem, try 2.

  2. //remove this or similar line from your index.html.

    In your case, you might have to look for 'ng_toppage' or the file indicated in the error (search in your index.html file) and remove the line.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johan-smits picture johan-smits  路  3Comments

towry picture towry  路  3Comments

pioz picture pioz  路  3Comments

ilrock picture ilrock  路  3Comments

suhomlineugene picture suhomlineugene  路  3Comments