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
No description
40 Replies
Percy
Percy13mo ago
Project ID: N/A
abdulaziz
abdulazizOP13mo ago
No description
Brody
Brody13mo ago
what kind of react app?
abdulaziz
abdulazizOP13mo ago
react.js
Brody
Brody13mo ago
of course more specifically though, vite? create-react-app?
abdulaziz
abdulazizOP13mo ago
oh sorry, it's create-raect-app
abdulaziz
abdulazizOP13mo ago
this might help
No description
Brody
Brody13mo ago
looks like you're running your app in development mode on railway, we definitely don't want to do that
abdulaziz
abdulazizOP13mo ago
What can I do to fix it?
Brody
Brody13mo ago
https://github.com/brody192/create-react-app-starter copy the nixpacks.toml and Caddyfile from this repo into yours
abdulaziz
abdulazizOP13mo ago
Okay I'll do it I don't have a nixpacks.toml should I create one?
Brody
Brody13mo ago
like I said, copy the nixpacks.toml and Caddyfile from that repo into yours
abdulaziz
abdulazizOP13mo ago
that's what I did
abdulaziz
abdulazizOP13mo ago
No description
Brody
Brody13mo ago
okay, please provide your build logs https://bookmarklets.up.railway.app/log-downloader/
Brody
Brody13mo ago
please remove your custom build command if you need CI set to false, set that in a service variable
abdulaziz
abdulazizOP13mo ago
okay I did that
Brody
Brody13mo ago
if the build fails again, send the build logs again
abdulaziz
abdulazizOP13mo ago
it faild I'll send the logs
Brody
Brody13mo ago
logs please
Brody
Brody13mo ago
you have not set CI = false in your service variables
abdulaziz
abdulazizOP13mo ago
it was false should I keep it as it was?
Brody
Brody13mo ago
show me please
abdulaziz
abdulazizOP13mo ago
still building
abdulaziz
abdulazizOP13mo ago
No description
abdulaziz
abdulazizOP13mo ago
it worked with CI = false but I'm still getting faild to fetch
abdulaziz
abdulazizOP13mo ago
and when I swtiched it ti true faild
No description
abdulaziz
abdulazizOP13mo ago
CI = false
No description
abdulaziz
abdulazizOP13mo ago
No description
abdulaziz
abdulazizOP13mo ago
deploy logs
Brody
Brody13mo ago
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
abdulaziz
abdulazizOP13mo ago
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 ❤️🫡
Brody
Brody13mo ago
haha no it didn't you're good happy to help!
abdulaziz
abdulazizOP13mo ago
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
Brody
Brody13mo ago
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
abdulaziz
abdulazizOP13mo ago
I have used sqlite3 in my project and I want to get the dataBase file how can I do it?
Brody
Brody13mo ago
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.
Want results from more Discord servers?
Add your server