Kompak Mark -Compacts yang Tidak Efektif Dekat Tumpukan Alokasi Gagal - JavaScript Out of Memory
add --max_old_space_size=4096 in npm run build script
Faithful Frog
add --max_old_space_size=4096 in npm run build script
rm -rf tmp/cache
// Use upto 6 GB (So, you can change 6000 in below, based on your need)
scripts: {
"build": "node --max_old_space_size=6000 ./node_modules/@angular/cli/bin/ng build",
"serve": "node --max_old_space_size=6000 ./node_modules/@angular/cli/bin/ng serve"
}
# How to fix FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in nodejs, try it 100% working:
1. open script using vim or nano ~/.bashrc
2. add this export NODE_OPTIONS=--max_old_space_size=16384 // what ever you want
3. enter in your terminal source ~/.bashrc
"build-serve": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve"
Make sure you are not creating an endless loop, like me ;)