Reputation: 1
everytime I try to deploy to cpanel following the steps of creating custom server file and run either npm run dev or npm run build I get Range error: out of memory. I was able to deploy a static nextjs app to the same cpanel but the issue seems like with dynamic apps.
I've tried updating the package.json file with giving it homepage url, updating the scripts to
"scripts": {
"dev": "node server.js",
"build": "next build",
"export": "next build && next export",
"start": "cross-env NODE_ENV=production node server.js",
"lint": "next lint"
},
Upvotes: -1
Views: 14