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