a year ago
My app deploys successfully, but I see the errors
npm error path /app
npm error command failed
npm error signal SIGTERM
npm error command sh -c vite preview --host 0.0.0.0 --port $PORT
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-03-09T09_56_07_278Z-debug-0.log
I'm running vite preview as it's a very simple app.
How do I view the "complete log of the run"?
I tried running railway cli, I ran
railway logs [DEPLOYMENT_ID] but it says "Deployment id does not exist"
Deployment ID I took from the logs interface, here's a copy of the JSON (with information redacted)
{ "severity": "error", "timestamp": "2025-03-09T10:15:00.692718952Z", "message": "npm error A complete log of this run can be found in: /root/.npm/_logs/2025-03-09T09_56_07_278Z-debug-0.log", "tags": { "deploymentId": "thedeployment_id_that_i_tried", "deploymentInstanceId": "thedeploymentinstanceidhere", "environmentId": "xxx", "pluginId": null, "projectId": "xxx", "serviceId": "xxx", "snapshotId": null }, "attributes": { "level": "error" } }
Note that this also fails with the follow build command:
npm error command sh -c npx serve -s dist -l $PORT
which matches the exact command for vite listed here: https://docs.railway.com/reference/errors/no-start-command-could-be-found
3 Replies
a year ago
Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues here
I've made this thread public so that the community might be able to help
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
Hi Jake, thanks for the note.
I actually used this exact same repo and was able to successfully deploy on another free cloud deployment platform - so I think this is isolated to Railway? The build and start scripts I have in this repo, don't cause an issue on that platform. Is anyone able to take a closer look into this? Or at least help me get visibility into the logs so I can try to decipher this?
The working start command is
"start": "serve --single --listen $PORT dist"
Status changed to Awaiting Railway Response Railway • about 1 year ago
a year ago
Those logs are of no consequence, they are only appearing on deployments that where removed.
Your actual problem can be solved with this docs page -
https://docs.railway.com/reference/errors/application-failed-to-respond#target-port-set-to-the-incorrect-value
Status changed to Awaiting User Response Railway • 12 months ago
7 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 7 months ago