2 years ago
After deploying my react application, it was indicated that the deployment was successful, after that I tried to access the domain where the application is located, but I was not successful, as some errors were indicated that I could not understand, could you help me? ?
4 Replies
2 years ago
It's very likely that you're running a react development server, to run a production server you can follow these steps:
Go to this repo: https://github.com/brody192/create-react-app-starter
Copy the
Caddyfileandnixpacks.tomlfile from that repo into yours
Status changed to Solved Railway • about 2 years ago
2 years ago
Perfect, I followed the steps, but now the build failed, pointing out that this CaddyFile file was overwritten,It points out that the file exists, and I just added it to the deploy branch, the error follows:
21 [stage-0 14/15] RUN caddy fmt --overwrite Caddyfile
21 0.366 Error: reading input file: open Caddyfile: no such file or directory
21 ERROR: process "/bin/bash -ol pipefail -c caddy fmt --overwrite Caddyfile" did not complete successfully: exit code: 1
[stage-0 14/15] RUN caddy fmt --overwrite Caddyfile:
0.366 Error: reading input file: open Caddyfile: no such file or directory
The repository indicates that by default the Caddy File file is configured for a vue project, as my project is React, could this generate any inconsistencies?
2 years ago
The repository indicates that by default the Caddy File file is configured for a vue project, as my project is React, could this generate any inconsistencies?
no, that's a typo, good catch!
Error: reading input file: open Caddyfile: no such file or directory
make sure your Caddyfile is named correctly.
2 years ago
Thank you very much, it worked, really typo lol