Infra error - Resource busy or locked
bateaumoteur
PROOP

a month ago

Hello,

My build failed due to a transient filesystem locking error, not a code or configuration problem. The npm ci command could not remove /app/node_modules/.cache because the directory was busy or locked during the build

Build logs:

npm warn config production Use --omit=dev instead.

npm error code EBUSY

npm error syscall rmdir

npm error path /app/node_modules/.cache

npm error errno -16

npm error EBUSY: resource busy or locked, rmdir '/app/node_modules/.cache'

npm error A complete log of this run can be found in: /root/.npm/_logs/2026-04-26T16_03_34_519Z-debug-0.log

Build Failed: build daemon returned an error < failed to solve: process "sh -c npm ci && composer install" did not complete successfully: exit code: 240 >

$20 Bounty

7 Replies

bateaumoteur
PROOP

a month ago

I use Railpack and never have deployment issue before


Railway
BOT

a month ago

The EBUSY error on /app/node_modules/.cache during npm ci is a transient filesystem contention issue in the build environment. You can trigger a redeploy of the same commit by clicking the three dots on the failed deployment and selecting "Redeploy", which should resolve it.


Status changed to Awaiting User Response Railway 26 days ago


Status changed to Awaiting Railway Response Railway 26 days ago


Railway
BOT

a month 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 26 days ago


Try setting NO_CACHE=1 in your service variables to disable build layer caching, then redeploy.


domehane
FREE

a month ago

Hello bateaumoteur,

just remove npm ci from your build command and keep only composer install railpack handles npm ci automatically in the install step so i think having it again in the build command is what causes the lock conflict

Hope this help you :)


domehane

Hello **bateaumoteur,** just remove npm ci from your build command and keep only composer install railpack handles npm ci automatically in the install step so i think having it again in the build command is what causes the lock conflict Hope this help you :)

bateaumoteur
PROOP

a month ago

I don't have npm ci on a build command :(


darseen

Try setting `NO_CACHE=1` in your service variables to disable build layer caching, then redeploy.

bateaumoteur
PROOP

a month ago

No changes :(


bateaumoteur

I don't have npm ci on a build command :(

domehane
FREE

a month ago

ok so npm ci is clearly showing in your build logs as part of the build step (sh -c npm ci && composer install), so it is being set somewhere even if you didn't type it directly , can you check your railway service settings and tell me what's in the "build command" field?


Status changed to Open brody 26 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...