I am facing an exception while ng build
(generating ES5 bundles for differential loading...)
An unhandled exception occured: Call retires were exceeded
Used versions:
8.3.20
8.2.7
12.12.1
Also in logs, it is mentioned
[error] Error: Call retries were exceeded at ChildProcessWorker.initialize
This was a problem of the @angular/cli
. Updating the version to >= 8.3.22
should fix the issue: see this comment in #16515
Basically the build process is running out of memory: see related angular-cli issues #15493, #16515
The recommended remedy is to:
12.14.0
package.json
change the "build"
script to: node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build
4GB
As a quick workaround it could also work to use older versions of angular/cli
and build-angular
:
"devDependencies": {
"@angular-devkit/build-angular": "0.803.20",
"@angular/cli": "8.3.20",
Another workaround is to disable differential-loading (i.e. skip generation of ES5 bundles), if you want this. Then the build-process will need less memory and may work.
For me editing tsconfig.json resolved my problem.
There was a change in @angular-devkit/build-angular which updated the differential loading. To fix this in your Ionic project, change the target value from “es2015” to “es5” in your tsconfig.json
For more details :- https://forum.ionicframework.com/t/ionic-cordova-build-get-stuck-at-generating-es5-bundles-for-differential-loading/180202/4
Use
node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With