Hi everyone,
I’m trying to deploy a Node.js application on Kinsta using the instructions from (web.kinsta.com/docs/application-hosting/build-deploy/application-start-command/). I’ve set up my Start command as per the example:
npm start
However, after deploying, the application doesn’t start as expected. I keep getting the error message: “Application did not start properly.” When I check the logs, it shows:
Error: Cannot find module 'express'
Here’s the setup in my package.json:
{
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.17.1"
}
}
I tried running npm install locally, and it works fine, but when deploying on Kinsta, it’s not detecting express.
I’ve also tried specifying the full path for the Start command like this:
npm install && npm start
But still, the issue persists.
Has anyone faced a similar problem with Node.js deployments on Kinsta? Any advice on how to resolve this?
Thanks!