Vite + React getting 404 on routes

mooygHOBBY

a year ago

Hey I am getting 404 on routes if I am not visiting them from within the app. But if I start with / and visit further it works

0 Replies

mooygHOBBY

a year ago

b4cf33da-774b-4cf4-a5dd-c6f6987fe0cd


mooygHOBBY

a year ago

It's using CSR


mooygHOBBY

a year ago

is there anyway to redirect?


a year ago

please share a link so we can experience this



a year ago

was this link not supposed to work for me?


mooygHOBBY

a year ago

it wass



mooygHOBBY

a year ago

this doens't


mooygHOBBY

a year ago

csr routing btw


a year ago

how are you serving the built static site?


mooygHOBBY

a year ago

using http-server


mooygHOBBY

a year ago

npx http-server dist


a year ago

well that explains it


a year ago

copy the nixpacks.toml and Caddyfile from this repo into your project


mooygHOBBY

a year ago

same issue still


mooygHOBBY

a year ago

returns application failed to respond now


mooygHOBBY

a year ago

with this error


a year ago

can you share your repo


mooygHOBBY

a year ago

/bin/bash: npm: command not found


a year ago

please remove any start command you may have set, like in the service settings


mooygHOBBY

a year ago

O okay


mooygHOBBY

a year ago

worked thank you


a year ago

no problem


Vite + React getting 404 on routes - Railway Help Station