Reputation: 800
When I run any angular command (ng command), I am getting insufficient memory error. But there is enough memory (RAM & Heap) in my system. The npm version is 6.4.1.
ng version or ng create or ng build
Getting the following error as:
<--- Last few GCs --->
<--- JS stacktrace --->
#
# Fatal process OOM in insufficient memory to create an Isolate
#
Upvotes: 3
Views: 8654
Reputation: 97
By default the memory limit in Node.js is 512 mb.
You need to run:
set NODE_OPTIONS=--max-old-space-size=30720
(*) Refer here if you want more information.
Upvotes: 2
Reputation: 460
As per the list of commands (which can be seen using ng help
). You should use ng -v
to get the version you are using for Angular.
Upvotes: 0