title: 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
body: <p><strong>Error I get</strong></p>
  
  <pre><code>            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.push../node_modules/zone.js/dist/zone.js.Zone.assertZonePatched (zone.js:58)
            at new NgZone (core.js:24212)
            at getNgZone (core.js:24925)
            at PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory (core.js:24823)
            at core.js:24867
            at exceljs.min.js:3
            at MutationObserver.n (exceljs.min.js:3)
            at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
            at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runGuarded (zone.js:161)
            at MutationObserver.&lt;anonymous&gt; (zone.js:144)
  </code></pre>
  
  <p>I am posting a small part of zone.js from where i am getting this error</p>
  
  <pre><code>     function Zone(parent, zoneSpec) {
              this._parent = parent;
              this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '&lt;root&gt;';
              this._properties = zoneSpec &amp;&amp; zoneSpec.properties || {};
              this._zoneDelegate =
                  new ZoneDelegate(this, this._parent &amp;&amp; this._parent._zoneDelegate, zoneSpec);
          }
          Zone.assertZonePatched = function () {
              if (global['Promise'] !== patches['ZoneAwarePromise']) {
                  throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +
                      'has been overwritten.\n' +
                      '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.)');
              }
          };
  </code></pre>
  
  <p>The above error is thrown. I am literally struggling hard to solve this.</p>
  
  <p><strong>When I get this error</strong></p>
  
  <p>I had a task in my project to export excel sheet with styling. I found a package called <a href="https://www.npmjs.com/package/exceljs" rel="nofollow noreferrer">exceljs</a>. After including this i started getting this error.</p>
  
  <p><strong>Some related documents from exceljs.js readme file</strong></p>
  
  <pre><code>## ES5 Imports
  </code></pre>
  
  <p>To use the ES5 transpiled code, use the dist/es5 path.</p>
  
  <pre class="lang-js prettyprint-override"><code>const ExcelJS = require('exceljs/dist/es5');
  </code></pre>
  
  <p><strong>Note:</strong> The ES5 build has an implicit dependency on a number of polyfills which are no longer
   explicitly added by exceljs.
   You will need to add "core-js" and "regenerator-runtime" to your dependencies and
   include the following requires in your code before the exceljs import:</p>
  
  <pre class="lang-js prettyprint-override"><code>// polyfills required by exceljs
  require('core-js/modules/es.promise');
  require('core-js/modules/es.object.assign');
  require('core-js/modules/es.object.keys');
  require('regenerator-runtime/runtime');
  
  // ...
  
  const ExcelJS = require('exceljs/dist/es5');
  </code></pre>
  
  <p>Browserify</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.js"&gt;&lt;/script&gt;
  &lt;script src="exceljs.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I am using es6. So what i am missing .please help me out.</p>
  
  <p><strong>Angular version details.</strong></p>
  
  <pre><code>            Angular CLI: 7.3.9
          Node: 10.0.0
          OS: linux x64
          Angular: 8.0.0
          ... core
  
          Package                             Version
          -------------------------------------------------------------
          @angular-devkit/architect           0.13.9
          @angular-devkit/build-angular       0.13.9
          @angular-devkit/build-optimizer     0.13.9
          @angular-devkit/build-webpack       0.13.9
          @angular-devkit/core                7.3.9
          @angular-devkit/schematics          7.3.9
          @angular/animations                 7.2.15
          @angular/cdk                        8.1.4
          @angular/cli                        7.3.9
          @angular/common                     7.2.15
          @angular/compiler                   7.2.15
          @angular/compiler-cli               7.2.15
          @angular/forms                      7.2.15
          @angular/http                       7.2.15
          @angular/language-service           7.2.15
          @angular/material                   8.1.4
          @angular/platform-browser           7.2.15
          @angular/platform-browser-dynamic   7.2.15
          @angular/router                     7.2.15
          @ngtools/webpack                    7.3.9
          @schematics/angular                 7.3.9
          @schematics/update                  0.13.9
          rxjs                                6.3.3
          typescript                          3.2.4
          webpack 
  </code></pre>