10 months ago
getting below error:
[stage-0 8/10] RUN --mount=type=cache,id=s/95ec9f3a-8be2-4f60-9019-b365137b6808-node_modules/cache,target=/app/node_modules/.cache npm run build
process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 1
Dockerfile:24
-------------------
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/95ec9f3a-8be2-4f60-9019-b365137b6808-node_modules/cache,target=/app/node_modules/.cache npm run build
25 |
26 |
-------------------
ERROR: failed to build: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 1
Error: Docker build failed
project id: b2bafbe0-3a7a-4362-a793-704ac1aa83c8
4 Replies
10 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 Deployment Issue – Need Help
- 🧵 Build failed - "/bin/sh -c npm run build" did not complete successfully: exit code: 1
- 🧵 Build failing for new deployments, was working before
If you find the answer from one of these, please let us know by solving the thread!
10 months ago
heyy, in your railway settings, go to the Build & Deploy tab, and in the Build Command, set it to: CI=false npm run build
Status changed to Open brody • 10 months ago
10 months ago
Hi Team,
When I am deploying a React App on Railway, I am getting below error:
Starting Container npm error code ENOENT npm error syscall open npm error path /app/package.json npm error errno -2 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/app/package.json' npm error enoent This is related to npm not being able to find a file. npm error enoent npm error A complete log of this run can be found in: /root/.npm/_logs/2025-07-29T07_26_55_675Z-debug-0.log.
You can see my project structure as well.