I am trying to build my angular-cli project with AOT
ng build --aot
but it failes with error
"FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"
The same thing happens if I build with the --prod flag.
Any idea?
There is already an issue opened on github: https://github.com/angular/angular-cli/issues/5618
Meanwhile, as a workaround, you can try specifying the max_old_space_size setting (in MB)
node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod
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