2 months ago
Keep running into a failed build - error from the build log says:
sh scripts/railway-build-api.sh
821ms
rm: cannot remove 'packages/ui/node_modules/.vite': Device or resource busy
Build Failed: build daemon returned an error < failed to solve: process "sh -c sh scripts/railway-build-api.sh" did not complete successfully: exit code: 1 >
2 Replies
Status changed to Open Railway • about 2 months ago
2 months ago
same
stage-0
RUN npm run build
834ms
> server@1.0.0 build
> tsc -p .
sh: 1: tsc: not found
Build Failed: build daemon returned an error < failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 127 >
was working fine 20 mins agao
Status changed to Solved rohitbkamat • about 2 months ago
2 months ago
I used the agent to help me resolve the issue.
The problem is that Railpack's automatic install phase runs npm ci before your script, and that's where the EBUSY error happens.
The fix:
- Added an
installCommandtorailway.jsonthat explicitly tells Railpack to use/tmpfor npm's cache - Updated the build script to skip its own
npm cisince Railpack's install phase now handles it - This ensures npm never tries to clean up
/app/node_modules/.cache
Status changed to Awaiting Railway Response Railway • about 2 months ago
Status changed to Solved sam-a • about 2 months ago