Describe the bug
When running the Dockerfile, right before installing local plugins, corepack seems to try to install pnpm@latest (which is v 10.33.4), even though it had corepack prepare pnpm@11.0.7 --activate. Up till now, it seems pnpm was running with v 11.0.7, but at this point of the Dockerfile I think pnpm isn't found and corepack tries to redownload it.
This is the error I get when trying to install my local plugin:
! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.33.4.tgz
10.33.4
[6/6] STEP 16/22: RUN bash -c ./bin/installLocalPlugins.sh
Installing plugin: 'ep_myplugin'
ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
Your pnpm version is incompatible with "/opt/etherpad-lite/src".
Expected version: >=11.0.0
Got: 10.33.4
This is happening because the package's manifest has an engines.pnpm field specified.
To fix this issue, install the required pnpm version globally.
To install the latest version of pnpm, run "pnpm i -g pnpm".
My fix
I added corepack use pnpm@11.0.7 to:
mkdir -p /usr/share/man/man1 && \
npm install -g corepack@latest && \
corepack enable && corepack prepare pnpm@${PnpmVersion} --activate && \
corepack use pnpm@11.0.7 && \
...
This made corepack download the right version, 11.0.7, at that point. I don't know enough about corepack, pnpm, or even Docker to correctly pinpoint the issue, but I think it's got something to do with pnpm workspace not finding the pnpm installation (which makes corepack redownload it).
To Reproduce
Steps to reproduce the behavior:
- Run Dockerfile with a local plugin installation
- See the above error when trying to install the plugin
Describe the bug
When running the Dockerfile, right before installing local plugins, corepack seems to try to install pnpm@latest (which is v 10.33.4), even though it had
corepack prepare pnpm@11.0.7 --activate. Up till now, it seems pnpm was running with v 11.0.7, but at this point of the Dockerfile I think pnpm isn't found and corepack tries to redownload it.This is the error I get when trying to install my local plugin:
My fix
I added
corepack use pnpm@11.0.7to:This made corepack download the right version, 11.0.7, at that point. I don't know enough about corepack, pnpm, or even Docker to correctly pinpoint the issue, but I think it's got something to do with pnpm workspace not finding the pnpm installation (which makes corepack redownload it).
To Reproduce
Steps to reproduce the behavior: