Sinu Varghese
Sinu Varghese

Reputation: 800

ng commands throws insufficient memory error [Fatal process OOM in insufficient memory to create an Isolate]

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

Answers (3)

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

Sinu Varghese
Sinu Varghese

Reputation: 800

Resolved the issue by re-installing nodejs.

Upvotes: 0

Sanchit
Sanchit

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.

enter image description here

Upvotes: 0

Related Questions