2 months ago
stage-0
RUN cd backend && mvn clean package -DskipTests
722ms
/bin/bash: line 1: cd: backend: No such file or directory
Build Failed: build daemon returned an error < failed to solve: process "/bin/bash -ol pipefail -c cd backend && mvn clean package -DskipTests" did not complete successfully: exit code: 1 >
Pinned Solution
2 months ago
okay so that's the issue , your root directory is already set to /backend so railway starts the build inside that folder. but your build command still has cd backend which tries to go into /backend/backend which doesn't exist. since you said there's no custom build command, check your repo for a railway.toml or nixpacks.toml file, that's where the cd backend && mvn clean package -DskipTests is coming from. open it and remove the cd backend && part, leaving just mvn clean package -DskipTests
5 Replies
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 2 months ago
2 months ago
the error "cd: backend: No such file or directory" means docker can't find your backend folder during the build. this is 100% caused by your dockerfile(i assumed there is a dockerfile) ;, can you share it?
2 months ago
There is no Dockerfile for this repo
2 months ago
okay since there's no Dockerfile, can you check two things in your Railway service settings: Is there a custom Build Command set? and What is the Root Directory set to? once I see those I can give you the solution
2 months ago
no custom build command and root directory is set to /backend
2 months ago
okay so that's the issue , your root directory is already set to /backend so railway starts the build inside that folder. but your build command still has cd backend which tries to go into /backend/backend which doesn't exist. since you said there's no custom build command, check your repo for a railway.toml or nixpacks.toml file, that's where the cd backend && mvn clean package -DskipTests is coming from. open it and remove the cd backend && part, leaving just mvn clean package -DskipTests
Status changed to Solved brody • 2 months ago