Docker: pnpm version ARG is out of stage scope; plugin builds fail with pnpm 12
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, nodejs, typescript
- Domain
- build-system, devops
Research direction
Start with src/static/js/pluginfw/installer.ts and the Dockerfile's pnpm installation stages; reproduce the failure with the provided docker buildx command. Check the corresponding develop Docker configuration noted in the report, then verify that plugin builds succeed and that the PnpmVersion build argument produces the requested pnpm version.
Written by the indexing model from the issue text.
Description
Describe the bug
Building the v3.3.3 production image with any non-empty ETHERPAD_PLUGINS value fails in the subsequent pnpm run plugins i step, before the requested plugin is installed. The failure is in the plugin installer's migration precheck: pnpm ls --long --json --depth=0 --no-production → error: unexpected argument '--no-production' found
(pnpm 12.3.4 has removed that flag; its hint is --no-prod).
A secondary bug was noticed during remediation: when passing a version pin for pnpm via build-args, the pinned version is not respected (ie, docker build always uses the latest pnpm version, not the one passed in build-args).
To Reproduce
docker buildx build --no-cache --progress=plain \
--target production \
--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 \
--build-arg 'ETHERPAD_PLUGINS=ep_comments_page' \
-t etherpad-plugin-repro \
'https://github.com/ether/etherpad.git#v3.3.3'
This fails in the plugin installation step after bin/installDeps.sh completes. Output:
[INFO] plugins - pnpm --version: 12.3.4
[ERROR] runCmd|pnpm - error: unexpected argument '--no-production' found
[ERROR] runCmd|pnpm - tip: a similar argument exists: '--no-prod'
Error: Command exited with code 2: pnpm ls --long --json --depth=0 --no-production
at migratePluginsFromNodeModules (src/static/js/pluginfw/installer.ts:61)
Further investigation shows that the requested pnpm version pin is ignored:
docker buildx build --no-cache --progress=plain \
--target build \
--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 \
--build-arg PnpmVersion=11.0.6 \
-t etherpad-pnpm-repro \
'https://github.com/ether/etherpad.git#v3.3.3'
This will succeed, but when you follow up with: docker run --rm etherpad-pnpm-repro pnpm --version, it will print 12.3.4 (latest) instead of the expected 11.0.6.
Expected behavior
Plugin build: a successful build
pnpm version pinned build: pnpm version spec respected during build.
Server (please complete the following information):
- Etherpad version: 3.3.3
- OS: Docker on Ubuntu 24.04.4 LTS
- Node.js version (
node --version): 24.21.0 (in image) - pnpm version (in image): 12.3.4
- npm version (
npm --version): N/A - Is the server free of plugins: N/A — this reproduces while building an image through Etherpad’s documented plugin build argument.
- Are you using any abstraction IE docker? Yes, Docker
Additional context
- pnpm 12.0.0 became npm
lateston 2026-08-26; v3.3.3 shipped 2026-07-29 with pnpm 11 aslatest, so builds worked until then. - The Dockerfile's ARG PnpmVersion=11.0.6 is declared before the first FROM and not redeclared in the adminbuild/build stages, so
npm install -g pnpm@${PnpmVersion}expands topnpm@and installslatest - This is why the pin doesn't hold and why
--build-arg PnpmVersion=…has no effect.develophas the same code. - Suggested fix:
--no-production→--no-prodininstaller.ts; addARG PnpmVersionafter bothnode:24-alpineFROMs. - Workaround: vendor the v3.3.3 Dockerfile and redeclare
ARG PnpmVersioninside both build stages.
- Dominant language
- TypeScript
- Stars
- 18.6k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 78
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ether/etherpad
-
Bug UI Waiting on Testing
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Bug i18n
-
Feature Request UX
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Bug docker
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·