# ZoneAwarePromise error on production build

**URL:** <https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048>\
**Category:** ionic-v3\
**Created:** [November 13, 2016, 4:50pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048 "2016-11-13T16:50:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![esolution](https://avatars.discourse-cdn.com/v4/letter/e/bcef8e/32.png) [@esolution](https://forum.ionicframework.com/u/esolution)\
**Post date:** [November 13, 2016, 4:50pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/1 "2016-11-13T16:50:32Z")

</div>

I create with ionic 2 RC 2, when on dev mode it can running fine on my android device , but when i compile for production i got Zone error like below

“Uncaught 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.)”

From the error i think i must load zone.js after polyfill, but i cannot find how to make zone.js load after polyfill.

In which code part on ionic 2 that set the load order for zone.js and polyfill.js?

---

<div class="post-metadata">

**Author:** ![Cleever](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cleever/32/104356_2.png) [@Cleever](https://forum.ionicframework.com/u/Cleever)\
**Post date:** [November 15, 2016, 9:43pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/2 "2016-11-15T21:43:03Z")

</div>

Same here.

app-scripts 0.0.44

Ionic RC2

---

<div class="post-metadata">

**Author:** ![esolution](https://avatars.discourse-cdn.com/v4/letter/e/bcef8e/32.png) [@esolution](https://forum.ionicframework.com/u/esolution)\
**Post date:** [November 16, 2016, 3:19pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/3 "2016-11-16T15:19:15Z")

</div>

I solve it with dirty hack on polyfill.js until the issue is resolved

Not sure whats the impact on other part

---

<div class="post-metadata">

**Author:** ![Cleever](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cleever/32/104356_2.png) [@Cleever](https://forum.ionicframework.com/u/Cleever)\
**Post date:** [November 16, 2016, 3:25pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/4 "2016-11-16T15:25:10Z")

</div>

Cool! I had to rollback to app-scripts 0.0.39.

---

<div class="post-metadata">

**Author:** ![esolution](https://avatars.discourse-cdn.com/v4/letter/e/bcef8e/32.png) [@esolution](https://forum.ionicframework.com/u/esolution)\
**Post date:** [November 17, 2016, 1:25am UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/5 "2016-11-17T01:25:35Z")

</div>

app-scripts 0.0.39 not have any ZoneAwarePromise issue on your side?

---

<div class="post-metadata">

**Author:** ![shepard](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@shepard](https://forum.ionicframework.com/u/shepard)\
**Post date:** [February 2, 2017, 3:03pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/6 "2017-02-02T15:03:46Z")

</div>

Has there been any end solution for this?  
I get the same error in production.

```
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.8.0
Xcode version: Not installed
```

---

<div class="post-metadata">

**Author:** ![esolution](https://avatars.discourse-cdn.com/v4/letter/e/bcef8e/32.png) [@esolution](https://forum.ionicframework.com/u/esolution)\
**Post date:** [March 9, 2017, 4:06pm UTC](https://forum.ionicframework.com/t/zoneawarepromise-error-on-production-build/70048/7 "2017-03-09T16:06:18Z")

</div>

I solve it with edit on polyfill.js file and do overwrite at ZoneAwarePromise.
