When I run npm install
in my Remix js project, I get the following errors:
npm ERR! code ENOMEM
npm ERR! syscall spawn
npm ERR! errno -12
npm ERR! spawn ENOMEM
I’ve already tried the following commands but still getting the above errors:
export NODE_OPTIONS=--max_old_space_size=4096
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
Then I tried installing with htop
on to see the live preview of Mem and Cpu usage and here’s the result:
What can I do to resolve this error?
Thanks!