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