2 years ago
Project id 4f0fc161-46d1-43d8-8755-ed4c3ba94e92
I'm trying to deploy a create-react-app project but the build fails. First it failed with "yarn run build" and then I set "npm run build" as the command and that also failed.
These commands work fine locally.
17 Replies
2 years ago
Mind sharing your build logs?
Dockerfile:24
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/8f9db790-14c3-4a96-81d3-4f4a2ac4805f-nodemodules/cache,target=/app/nodemodules/.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
2 years ago
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
2 years ago
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!
2 years ago
No problem 🙂
Just one more quick question - for static SPA, am i supposed to deploy to Railway or use a static site service?
2 years ago
either could work, although I would personally use Railway ( definitely biased though )
2 years ago
You can deploy to railway but u will need something to serve that static file
2 years ago
Nixpacks can actually serve static files, you just throw a Staticfile file in your project
2 years ago
TheMoreYouKnow
If it's simply a static website.. i'd throw a CDN in front of it personally (like Cloudflare for example), but not necessary 🙂