R
Railway•17mo ago
omzi

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.js
The 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
Percy
Percy•17mo ago
Project ID: 5c35e9f5-be7c-4988-b80b-a5113d5ce442
omzi
omzi•17mo ago
5c35e9f5-be7c-4988-b80b-a5113d5ce442
Brody
Brody•17mo ago
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
omzi
omzi•17mo ago
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.
Brody
Brody•17mo ago
does it reprint that on its own, or does it reprint it because you clicked restart?
omzi
omzi•17mo ago
On its own, repeatedly 😭 I had to change the Restart policy to "on Fail".
Brody
Brody•17mo ago
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
omzi
omzi•17mo ago
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.
Brody
Brody•17mo ago
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
Want results from more Discord servers?
Add your server