a year 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
a year 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
Caddyfile
andnixpacks.toml
file from that repo into yours
Status changed to Solved railway[bot] • about 1 year ago
a year 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?
a year 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.
a year ago
Thank you very much, it worked, really typo lol