NodeJS Deploy Error
Hey Railway staff. Please I have an issue on a project I'm working on. A service on my project has refused to start and I'm not sure what the issue is. My project builds fine (TypeScript) and it is NodeJS-based. The issue is with the starting. The amusing part of it all is that if I rollback to a previous commit, it starts fine. I don't know if Railway's build system was updated or something. I've tried a couple of things (explicitly setting a Node engine & specifying my build and start commands from the project settings)
Here's the error I'm getting:
npm WARN config production Use
--omit=dev
instead.
[email protected] start node ./build/app.jsThe error keeps getting logged repeatedly from all my service's replicas instead of starting. Please I need urgent assistance to find the solution as a production project depends on it. Thanks ;).
9 Replies
Project ID:
5c35e9f5-be7c-4988-b80b-a5113d5ce442
5c35e9f5-be7c-4988-b80b-a5113d5ce442
the snipit of the logs you provided does not contain any error messages, that is what the standard starting logs of a node app look like
That's the thing: The service keeps on logging that message repeatedly. When I try accessing the service through its API, I get a 503 Server Error.
It just logs that message. It doesn't start it.
does it reprint that on its own, or does it reprint it because you clicked restart?
On its own, repeatedly ðŸ˜
I had to change the Restart policy to "on Fail".
ah then your app is crashing
but you just aren't logging any error messages, its going to be really hard to debug the cause of the fault without proper logging
I setup a logger in the service for when the app starts, general logging, and for SIGINTs and other events that might cause the app to be terminated.
For some reason, the app/service's code is not getting reached at all.
your app is crashing, the logs you have provided do show that at least app.js was started, but there's unfortunately nothing we can do to help you without error logs