claudiu
Next JS build failed
Hello, is first time when I'm trying railway.app and I'm trying to deploy a repo which is structured like this
github/repo
/client
/server
client is a next.js project
server is a nest.js project
I'm using pnpm for builds for both of them but the client failed with this error
`
#3 [internal] load metadata for
...
#12 [stage-0 8/10] RUN --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-next/cache,target=/app/.next/cache --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-node_modules/cache,target=/app/node_modules/.cache pnpm build
#12 0.485 /bin/bash: line 1: pnpm: command not found
#12 ERROR: process "/bin/bash -ol pipefail -c pnpm build" did not complete successfully: exit code: 127
-----
> [stage-0 8/10] RUN --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-next/cache,target=/app/.next/cache --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-node_modules/cache,target=/app/node_modules/.cache pnpm build:
#12 0.485 /bin/bash: line 1: pnpm: command not found
-----
Dockerfile:24
-------------------
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-next/cache,target=/app/.next/cache --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-node_modules/cache,target=/app/node_modules/.cache pnpm build
25 |
26 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm build" did not complete successfully: exit code: 127
Error: Docker build failed
#3 [internal] load metadata for
...
#12 [stage-0 8/10] RUN --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-next/cache,target=/app/.next/cache --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-node_modules/cache,target=/app/node_modules/.cache pnpm build
#12 0.485 /bin/bash: line 1: pnpm: command not found
#12 ERROR: process "/bin/bash -ol pipefail -c pnpm build" did not complete successfully: exit code: 127
-----
> [stage-0 8/10] RUN --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-next/cache,target=/app/.next/cache --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-node_modules/cache,target=/app/node_modules/.cache pnpm build:
#12 0.485 /bin/bash: line 1: pnpm: command not found
-----
Dockerfile:24
-------------------
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-next/cache,target=/app/.next/cache --mount=type=cache,id=s/00442537-a0d8-4cd5-bfd3-4dc268643cd0-node_modules/cache,target=/app/node_modules/.cache pnpm build
25 |
26 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm build" did not complete successfully: exit code: 127
Error: Docker build failed
4 replies