Next.js Discord

Discord Forum

Official Dockerfile example broken for `pnpm`?

Unanswered
Williamson's Sapsucker posted this in #help-forum
Open in Discord
Williamson's SapsuckerOP
In the official example: https://github.com/vercel/next.js/tree/canary/examples/with-docker

In the Dockerfile, they use "RUN yarn build" as an example.

However, when I try to use "RUN pnpm build", it breaks, because pnpm is not found, even though I install it in the previous stage.

Is this a bug?

2 Replies

Williamson's SapsuckerOP
If I change it to the following, the build succeeds:

RUN yarn global add pnpm
RUN pnpm build
But surely it's a bug that pnpm is not brought over between the steps?