The best places to look are the metrics in the dashboard, and the logs.
The logs should show if there were any errors. Often you will see why that is, likely with a code or at least a message you can then look up to debug it. “Process failed because of X” or “Time-out doing Y” or something. Try flyctl logs and see what that says.
The metrics show RAM, CPU usage etc. If any of those have spiked above the included amount, that could also cause the process to be killed/suspended. You could try temporarily increasing the CPU and/or RAM to see if that helps.
Yep, nodemon will be a dev dependency. When you run your app locally, you would install all its dependencies with npm install
But when Fly builds an image of your app, your Dockerfile (or builder) will likely only install production dependencies. Hence it won’t install nodemon and so will result in an error if your app does nodemon index.js.
Normally that is what you want to happen. Since you normally use nodemon for local development. That restarts the node server/process when you are changing files. But you don’t need to do that in production (since the files won’t change).
So … your options would be either:
run your app with node index.js, not nodemon index.js.
or if you really need to run it with nodemon for some reason …
install all dependencies, which will include nodemon too. If you have a Dockerfile, you would probably change e.g npm install --production to npm install. There are different ways to write that. Some use npm ci. That way nodemon will be found, and that particular error won’t happen.