FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x7fb605f3446c node::Abort() [/lib/x86_64-linux-gnu/libnode.so.64] 2: 0x7fb605f344b5 [/lib/x86_64-linux-gnu/libnode.so.64] code example

Example 1: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

set NODE_OPTIONS=--max_old_space_size=4096

Example 2: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

"scripts": {
    "ng-high-memory": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --configuration=prod",
}

Example 3: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

"build-serve": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve"