manage heap size of node procsess
to see current allocated size for node env.
run this command in terminal
node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'
to set/increase heap size run this command in terminal
From the control panel go to System → Advanced system settings → Environment Variables → New (user or system)
Or this can be done in PowerShell with:
$env:NODE_OPTIONS="--max-old-space-size=8192"
You can also increase this number, if necessary. We've seen folks need to increase this up to 14 GB for some larger projects!
export NODE_OPTIONS=--max-old-space-size=8192