The official Next.js Dockerfile example does not work if I switch npm to pnpm.
How should I modify that Dockerfile so that it remains multi-stage, but also uses pnpm instead of npm?
Another solution is installing pnpm using npm. When you install nodejs it comes with npm as the default package manager. So you can install pnpm using npm using the following command npm install -g pnpm
In the docker file it will be written as;
RUN npm install -g pnpm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With