I have deployed a number of applications on Netlify without any issues. But this is the first time I am deploying one with an external database. It works well locally, but when I get it on Netlify the build fails with a “build exceeded maximum allowed runtime” error.
I usually run it locally with “npm run dev” script. I suppose I need to create a build script in package.json, but not sure how to make it work with the “npm run dev” so that the client side will remain in sync.
This is the current state of my package.json
“scripts”: {
“start”: “node server/server.js”,
“backend”: “nodemon server/server.js”,
“frontend”: “npm run start --prefix client”,
“dev”: “concurrently "npm run backend" "npm run start --prefix client"”
}
My question is: if I should add a “build”: “npm run dev” in the json file, then use “npm run build” in Netlify, will that resolve the error?