#404 main page not found

16 messages · Page 1 of 1 (latest)

fiery ruin
#

I deployed a docker file that contains multiple services and express app that serves react is one of them.
When I try to access the main webpage, I get 404 with following logs in the deployment

Error: ENOENT: no such file or directory, stat '/usr/src/app/noodle/build/index.html'
Error: ENOENT: no such file or directory, stat '/usr/src/app/noodle/build/index.html'

I tried to set the Caddyfile and nixpacks.toml files based on this repo here
https://github.com/brody192/vite-react-template/blob/main/nixpacks.toml to no luck
https://popspace-demo-production.up.railway.app/

GitHub

Contribute to brody192/vite-react-template development by creating an account on GitHub.

radiant ospreyBOT
#

Project ID: N/A

fleet patio
#

are you able to share your repo?

fiery ruin
fleet patio
fiery ruin
#

ah that's true, I can see in Caddyfile I was pointing to dist folder, that's gotta be causing some troubles at the very least

#

gonna try now

#

hm, without setting /noodle as a root directory leads to the same issue
but with setting /noodle as a root directory I am getting a bunch of errors

2.350 warning Resolution field "[email protected]" is incompatible with requested version "babel-loader@^8.2.2"

4.356 error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.

4.356 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

-----

 

Dockerfile:26

-------------------

24 |     ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH

25 |     COPY . /app/.

26 | >>> RUN --mount=type=cache,id=s/17269ca0-4835-43a2-8593-0fdab0c1c387-/root/cache/Cypress,target=/root/.cache/Cypress --mount=type=cache,id=s/17269ca0-4835-43a2-8593-0fdab0c1c387-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile

27 |

28 |     # build phase

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

 

Error: Docker build failed
#

not actually sure where the RUN is from that "causes" the error, it's Railway's docker file?

fleet patio
#

you need the root directory to be set to /noodle since that's the app you are trying to deploy, you'll need to deploy all the app's separately

fleet patio
fiery ruin
#

i am back on this topic, the issue is that when using suggested Caddy files and nix toml it brings a lot of problems during deployment that I am not sure I am able to solve, when I am getting Not found, at least I am able to build the project fine and I can see that the logs are normal, like the deployment is happening
https://popspace-demo-production.up.railway.app/
however, I also have couple of other ports that are supposed to be available - backend, and none of them are responsive
for example

curl https://popspace-demo-production.up.railway.app:8889/media_providers

so it seems like there is a bigger problem than just UI not rendering correctly, none of my services are not working at all

#

whereas I tried to deploy it Fly.io and I got opposite almsot 😄 I get the UI working but the backends impossible to make work

#

well actually I cannot even deploy separately these services, when I try to deploy the UI service, it errors out while trying to import other serivces, because it's trying to find them in the global registry instead of from workspace

fleet patio
#

you can't access specific ports, you need to deploy each app individually