The question is published on by Tutorial Guruji team.
I have launched a t2.micro server on aws and while running our application on server with simply “sudo npm start” i am getting :
tried many solution like upgraded node version and set NODE_OPTIONS=–max-old-space-size=1024 but it didn’t work for me so can anyone please help me out to resove this issue ?
start script: tsc && node dist/index.js
You’re just running out of memory to build your project on a t2.micro. Typescript builds are memory-heavy.
- set up swap memory on the machine (see e.g. https://wiki.archlinux.org/index.php/swap#Manually) (which will not be very performant)
- or better yet, build your project (
node dist/index.js) on the micro machine.