a year ago
I would rather use Railway for all of my apps, but it is not working well with certain ones.. Not much help here either..
45 Replies
a year ago
Hello,
Discord is primarily community support, I believe you have prior threads? community support is only as good as you let it be, stuff like MREs help the community help you.
Hi. I'm not sure how to provide an example.. I have the github repo (which is not mine) How do I come up with an acceptable MRE?
a year ago
If you have a public repo that you are trying to deploy that should be sufficient, please be patient and the community should come to help.
Sorry if I seem frustrated.. I've been at this for 5 days.. I have forked this repo: https://github.com/mercurjs/vendor-panel
a year ago
You're welcome to bump your previous thread, but unfortunately, the team cannot offer application level support.
a year ago
Logs or error messages would be helpful. "It's not working" is not enough for us community members to go off of
a year ago
a problem with the application or how you have set it up.
a year ago
Railway does not hold your hand as much as Vercel does. It's great that you were able to get your app hosted on Vercel with no effort, but clearly something is pulling you back to Railway. We can help you get there, but you have to help us help you
Sure, I understand. The problem is, I've tried many different things and they all fail for different reasons.. I'm not sure at the moment which is the correct approach.. Out of the box with Nixpacks, I get Error: No start command could be found
a year ago
How do you run the app locally? "vite" does not seem like a correct start command.
a year ago
Running on localhost should be fine. What makes you think it's not working? Again, please share any logs or errors
in Vercel, the only thing I had to do was override the build command with yarn run build:preview
a year ago
That runs a dev environment, in production it should likely be npm run start
a year ago
Did you not create one here?
I did and here are the logs:```Starting Container
npm warn config production Use --omit=dev instead.
vendor-panel@1.0.0 start
vite
VITE v5.4.19 ready in 558 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ Inspect: http://localhost:5173/__inspect/
Error: spawn xdg-open ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)npm error path /app
npm error command failed
npm error signal SIGTERM
npm error command sh -c vite
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-06-25T21_41_23_253Z-debug-0.log
Stopping Container```
a year ago
Seems like the vite start command is expecting a /app directory. Please use the start command I suggested above
not sure I follow. you suggested npm run start which would run the start script ("vite") as seen in package.json
a year ago
Apologies, I'm not too familiar with vite. I've done some Googling and here's what I've found.
Vite should not be used in production as it's optimized for development. Instead, you should npm run build and serve from the resulting distribution with caddy
yes, that all sounds right. "vite build" is used to generate a production build
a year ago
Set your start command to caddy run and see what happens
a year ago
It doesn't. Seems like Railpack's Vite detection isn't fantastic
a year ago
It would help greatly if the source repo had a proper start command. Railway would likely be able to work with that. Because it's missing, Railway doesn't know what to do
I think Railway will use Caddy if the conditions are right.. I am trying to follow this thread - https://discord.com/channels/713503345364697088/1386788139649073223
So the deployment succeeds now and it seems caddy is running, but when I visit the site, I get Bad Gateway
a year ago
Any errors in the logs?
I finally got this working. It turns out I had to install Caddy package, remove start script, remove Dockerfile and change build script to "vite build"
a year ago
Great! Port was the next thing to check. Glad to hear you got it all working
a year ago
!s
Status changed to Solved adam • 11 months ago
