1

I have update my application from angular 8 to 9, after update the packages, i have complied the application successfully. But in the browser Chrome console. It has the error message:


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

I have tried to move the zone.js to the end of the file polyfills.ts and some other suggestions. They do not work.

this is my polyfills.ts

import 'core-js/es/reflect';



import 'hammerjs/hammer';


import 'zone.js/dist/zone';  // Included with Angular CLI.

this is my ng version:

Angular CLI: 9.0.3
Node: 10.16.0
OS: win32 x64

Angular: 9.0.3
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.3
@angular-devkit/build-angular     0.900.3
@angular-devkit/build-optimizer   0.900.3
@angular-devkit/build-webpack     0.900.3
@angular-devkit/core              9.0.3
@angular-devkit/schematics        9.0.3
@angular/cdk                      9.0.0
@angular/flex-layout              9.0.0-beta.29
@angular/material                 9.0.0
@ngtools/webpack                  9.0.3
@schematics/angular               9.0.3
@schematics/update                0.900.3
rxjs                              6.5.4
typescript                        3.6.5
webpack                           4.41.2

Could anybody give me some ideas or suggestions? Thanks a lot.

xKobalt
  • 1,498
  • 2
  • 13
  • 19
congyi shi
  • 11
  • 1

1 Answers1

2

This has been fixed, and will be released very soon in zone.js 0.10.3

jiali passion
  • 1,691
  • 1
  • 14
  • 19