#Deploying create react app
19 messages · Page 1 of 1 (latest)
Project ID: 4f0fc161-46d1-43d8-8755-ed4c3ba94e92
Mind sharing your build logs?
https://bookmarklets.up.railway.app/log-downloader/
Dockerfile:24
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/8f9db790-14c3-4a96-81d3-4f4a2ac4805f-node_modules/cache,target=/app/node_modules/.cache npm run build
25 |
26 |
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 1
Its a static app
Mind downloading the logs using the link I gave you?
I don't want to use that link bro, sorry. I don't know what it is and how it works
I'll copy the entire logfile, one sec
looks to me like eslint errors, you need to fix those to deploy your app
if you don't want to bother fixing the errors then you can set CI to false in your service variables
Thanks bud. I did not realize that eslint errors would prevent deploying, first time deploying SPA. Thank you!
No problem 🙂
Just one more quick question - for static SPA, am i supposed to deploy to Railway or use a static site service?
either could work, although I would personally use Railway ( definitely biased though )
You can deploy to railway but u will need something to serve that static file
Nixpacks can actually serve static files, you just throw a Staticfile file in your project
https://nixpacks.com/docs/providers/staticfile
Although to be clear, for SPA apps like this one, you'd want to go to Brody's create-react-app-starter repo and copy the Caddyfile and nixpacks.toml file into yours
#TheMoreYouKnow
Thank you for sharing, I will check it out!
If it's simply a static website.. i'd throw a CDN in front of Railway personally (like Cloudflare for example), but not necessary 🙂