#Error deploying backend to railway

1 messages · Page 1 of 1 (latest)

livid radish
#

Hello, so with 1.8.0 update I'm unable to deploy a newly created backend to Railway, I checked build logs and here what I found, any help would be appreciated
``` #13 0.794 npm WARN config production Use --omit=dev instead.
#13 0.810
#13 0.810 > [email protected] build
#13 0.810 > yarn run clean && tsc -p tsconfig.json
#13 0.810
#13 0.818 sh: 1: yarn: not found

#13 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 127

[stage-0 9/10] RUN --mount=type=cache,id=s/189c34a6-b19d-4310-b5ae-5f71cbfcda1e-node_modules/cache,target=/app/node_modules/.cache npm run build:
#13 0.794 npm WARN config production Use --omit=dev instead.
#13 0.810
#13 0.810 > [email protected] build
#13 0.810 > yarn run clean && tsc -p tsconfig.json
#13 0.810
#13 0.818 sh: 1: yarn: not found


Dockerfile:25

23 | # build phase
24 | COPY . /app/.
25 | >>> RUN --mount=type=cache,id=s/189c34a6-b19d-4310-b5ae-5f71cbfcda1e-node_modules/cache,target=/app/node_modules/.cache npm run build
26 |

27

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 127

Error: Docker build failed```

livid radish
#

Replacing the build command in railway settings to babel src -d dist --extensions \".ts,.js\" fixed the issue

slim sentinel
#

Replace yarn by npm, seems that yarn is not install in your deployment as it is written in the error message in your console

quartz narwhal
livid radish