faild to fetch
after deplaying my react app on railway it has started givving me an error
it is still working very well on my local compoter
40 Replies
Project ID:
N/A
what kind of react app?
react.js
of course
more specifically though, vite? create-react-app?
oh sorry, it's create-raect-app
this might help
looks like you're running your app in development mode on railway, we definitely don't want to do that
What can I do to fix it?
https://github.com/brody192/create-react-app-starter
copy the nixpacks.toml and Caddyfile from this repo into yours
Okay I'll do it
I don't have a nixpacks.toml should I create one?
like I said, copy the nixpacks.toml and Caddyfile from that repo into yours
that's what I did
okay, please provide your build logs https://bookmarklets.up.railway.app/log-downloader/
please remove your custom build command
if you need CI set to false, set that in a service variable
okay I did that
if the build fails again, send the build logs again
it faild
I'll send the logs
logs please
you have not set CI = false in your service variables
it was false should I keep it as it was?
show me please
still building
it worked with CI = false but I'm still getting faild to fetch
and when I swtiched it ti true faild
CI = false
deploy logs
alright now that you have your app running in a production environment, please make sure you are setting the correct cors headers on your server
okay thanks
It's working thank you very much ❤️
You just saved me from wasting a year 😂
Sorry Idk why my first response sounds very bad I really appreciate your help ❤️🫡
haha no it didn't you're good
happy to help!
Hello @Brody I hope you are doing well
Is there anyway to get the files of my node.js app
Because I'm storing data locally on the server using sqlite
container storage is empherial, you would want to use a volume so that your files persist across multiple deployments
https://docs.railway.app/reference/volumes
I have used sqlite3 in my project and I want to get the dataBase file how can I do it?
as previously mentioned, the container storage is empherial, unless you built backup functionality into your app to download a copy of the sqlite database, the sqlite database will not be accessable and will also be lost on the next deployment.
please look into using an external database like postgres.