Vite + React getting 404 on routes
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 worksSolution:Jump to solution
https://github.com/brody192/vite-react-template
copy the nixpacks.toml and Caddyfile from this repo into your project...
16 Replies
Project ID:
b4cf33da-774b-4cf4-a5dd-c6f6987fe0cd
b4cf33da-774b-4cf4-a5dd-c6f6987fe0cd
It's using CSR
is there anyway to redirect?
please share a link so we can experience this
SocialsFYI
Author: mooy
was this link not supposed to work for me?
how are you serving the built static site?
using http-server
npx http-server dist
well that explains it
Solution
https://github.com/brody192/vite-react-template
copy the nixpacks.toml and Caddyfile from this repo into your project
same issue still
returns application failed to respond now
with this error
can you share your repo
/bin/bash: npm: command not found
please remove any start command you may have set, like in the service settings
O okay
worked thank you
no problem