If i want to deploy a small to medium sized Next.js project to a small (512mb or 1gb ram) linux server - when i run
npm run build
often the server crashes and needs to be restarted. i need an easy solution to this.
Tried building it locally and send .next folder to server and seemed it didn't work.