8 months ago
I’m trying to deploy my Vite app (frontend) but app is crashing with the following erros in deploy, I’m trying to find a solution for this:
Deploys logs
vite v5.4.10 building for production...
transforming...
Killed
container event container died
npm warn config production Use --omit=dev
instead
repo: https://github.com/devLeticia/chimptok
12 Replies
8 months ago
I have removed the command CI=false npm --omit=dev run build, and now it deploys successfully. But when I try to access the link, I get the 502 Bad Getaway Application failed to respond
8 months ago
8 months ago
I have removed it. I'm trying all I can . Container is not dying anymore, but I still get the 502 error.
8 months ago
Build is publishing image for about 30 minutes now...
Attachments
8 months ago
Please see these docs - https://docs.railway.app/guides/fixing-common-errors#application-failed-to-respond
8 months ago
Hey Brody!
The doc above was the first thing I read and tried to follow, but it didn't work. Maybe I'm doing something wrong because I'm new to deployment and there's no Vite example in the docs. Can you help me? I tried to set the host and port like this.
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint src --ext .ts,.tsx --fix",
"start": "serve -s dist -l $PORT",
"preview": "vite preview"
},
It built super fast, but still not working (502 error).
8 months ago
You don't need to worry about the host or port, you are using target ports, please read that section of the docs page I linked.
8 months ago
I've read the docs, but it's still not working. Is there another approach to solve the problem?
8 months ago
You need to read the part about target ports, please read carefully, do not skim read.
8 months ago
I had to change the port to 8080. I had so many errors before that caddy port was not showing up. Thank you
Status changed to Solved brody • 8 months ago