2 years ago
#8 [4/5] RUN npm run build
Aug 12 03:14:51
Aug 12 03:14:52
#8 0.270 /bin/bash: line 1: npm: command not found
Aug 12 03:14:52
Aug 12 03:14:52
#8 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 127
Aug 12 03:14:52
-----
Aug 12 03:14:52
> [4/5] RUN npm run build:
Aug 12 03:14:52
0.270 /bin/bash: line 1: npm: command not found
Aug 12 03:14:52
-----
Aug 12 03:14:52
Aug 12 03:14:52
Dockerfile:15
Aug 12 03:14:52
-------------------
Aug 12 03:14:52
13 | # build phase
Aug 12 03:14:52
14 | COPY . /app/.
Aug 12 03:14:52
15 | >>> RUN npm run build
Aug 12 03:14:52
16 |
Aug 12 03:14:52
17 |
Aug 12 03:14:52
-------------------
Aug 12 03:14:52
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 127
Aug 12 03:14:52
Aug 12 03:14:52
Error: Docker build failed
I just dont know why this issue is happening?
Also theres a green check in "initialization" but in build > build image it says "Failed to build an image. If this error persists, please contact Railway support."
Help.
Thank you.
1 Replies
2 years ago
Npm is detected when you have a package.json in the root, do you have a package.json in the set root directory?