Fail during image build
williamrichardson743
HOBBYOP

a month ago

Please try npm i again after removing both package-lock.json and node_modules directory. (@/app/postcss.config.js) at load (file:///app/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.39_lightningcss@1.32.0/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:33632:11) at file:///app/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.39_lightningcss@1.32.0/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:33657:16 at Array.map () at plugins (file:///app/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.39_lightningcss@1.32.0/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:33656:8) at processResult (file:///app/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.39_lightningcss@1.32.0/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:33726:14) at file:///app/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.39_lightningcss@1.32.0/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:33856:14] Node.js v18.20.5 2026-04-22T05:08:59.918571051Z [err] [stage-0 13/15] RUN --mount=type=cache,id=s/b03c79eb-0fb1-494e-8468-f68ec9f03d9f-node_modules/cache,target=/app/node_modules/.cache pnpm install && npm run build 2026-04-22T05:08:59.933651535Z [err] Dockerfile:30 2026-04-22T05:08:59.933672632Z [err] ------------------- 2026-04-22T05:08:59.933677198Z [err] 28 | # build phase 2026-04-22T05:08:59.933680502Z [err] 29 | COPY . /app/. 2026-04-22T05:08:59.933685675Z [err] 30 | >>> RUN --mount=type=cache,id=s/b03c79eb-0fb1-494e-8468-f68ec9f03d9f-node_modules/cache,target=/app/node_modules/.cache pnpm install && npm run build 2026-04-22T05:08:59.933689176Z [err] 31 | 2026-04-22T05:08:59.933692531Z [err] 32 | 2026-04-22T05:08:59.933696099Z [err] ------------------- 2026-04-22T05:08:59.933699741Z [err] ERROR: failed to build: failed to solve: process "/bin/bash -ol pipefail -c pnpm install && npm run build" did not complete successfully: exit code: 1 2026-04-22T05:08:59.939157793Z [err] Error: Docker build failed

Solved$10 Bounty

Pinned Solution

I would recommend either choosing npm or pnpm. It seems like you're currently using both from the logs you provided.

Also, removing the lockfile should be done from your side. Railway cannot help with this.

You'll need to manually delete the node_modules directory and the lockfile, run npm i or pnpm i, then commit the newly generated lockfile.

2 Replies

Status changed to Open Railway about 1 month ago


I would recommend either choosing npm or pnpm. It seems like you're currently using both from the logs you provided.

Also, removing the lockfile should be done from your side. Railway cannot help with this.

You'll need to manually delete the node_modules directory and the lockfile, run npm i or pnpm i, then commit the newly generated lockfile.


euphoriuhhh
FREE

a month ago

set the build command to pnpm install && pnpm run build


Status changed to Solved 0x5b62656e5d 4 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...