Skip to content

fix(release): use pnpm hoisted node-linker for etherpad bundle (Windows)#54

Merged
JohnMcLear merged 1 commit into
mainfrom
fix/release-pnpm-hoisted-etherpad
May 12, 2026
Merged

fix(release): use pnpm hoisted node-linker for etherpad bundle (Windows)#54
JohnMcLear merged 1 commit into
mainfrom
fix/release-pnpm-hoisted-etherpad

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

v0.4.3 still failed on Windows after #51 excluded `etherpad/bin/`. The new failure is one layer deeper — inside `resources/etherpad/src/node_modules/` itself:

```
.\resources\etherpad\src\node_modules\http-errors
: The system cannot find the path specified.
```

Root cause: pnpm's default layout creates junctions from `node_modules/` → `node_modules/.pnpm/@/node_modules/`. Our post-install `prunePnpmStore` deletes targets in `.pnpm/` that the dirty-driver runtime path never loads, but some still leave dangling junctions in the top-level `node_modules/` view. Linux/macOS 7za follows through (no harm done); Windows 7za scan-fails and exits 1 on the missing target.

Fix

Pass `--config.node-linker=hoisted` to the `pnpm install` step inside `fetch-etherpad.mjs`. That produces a flat, npm-style layout with real files instead of junctions — no symlinks, nothing to dangle. This is what every Electron app on Windows already ships.

Tradeoff

Bundle grows by ~135MB (no `.pnpm` dedup). The existing `prunePnpmStore` step still runs but no-ops gracefully because `.pnpm/` doesn't exist in hoisted mode (try/catch already handles that path).

Trimming the hoisted-mode transitive bloat (mongodb, mysql2, pg, ...) is a follow-up via electron-builder's `extraResources` filter, but it's not required to ship — "Windows build actually exists" wins over "Windows bundle is small."

Test plan

  • Repo CI (lint/typecheck/test/e2e on this PR)
  • After merge: cut v0.4.4. The Release workflow's release-windows should finally produce `Etherpad-Desktop-Setup-0.4.4.exe` + `Etherpad-Desktop-0.4.4-portable.exe` + `latest.yml`.

Snap publish (still blocked on you)

Independent of this PR. The earlier v0.4.x snap uploads are stuck in Snap Store review queue; until you "Reject and remove from review queue" them on https://dashboard.snapcraft.io/, the v0.4.4 snap publish will hit the same conflict.

🤖 Generated with Claude Code

After #51 excluded etherpad/bin/, Windows still failed because the
.nsis.7z packaging hit dangling junctions inside
resources/etherpad/src/node_modules/ itself. Example from the v0.4.3
build:

  .\resources\etherpad\src\node_modules\http-errors\
    : The system cannot find the path specified.

pnpm's default layout is symlinks/junctions from node_modules/<dep>
into node_modules/.pnpm/<dep>@<ver>/node_modules/<dep>. Our
post-install store prune (PNPM_PRUNE_PREFIXES) deletes some of
those targets, leaving the junction dangling. On Linux 7za follows
through; on Windows the junction-target check fails and 7za exits 1.

Pass `--config.node-linker=hoisted` so pnpm produces a flat,
npm-style layout with real files instead of junctions. No symlinks,
nothing to dangle. This is what every Electron app on Windows ships
anyway.

Tradeoff: ~135MB larger bundle (no .pnpm dedup). The prunePnpmStore
step still runs but no-ops because .pnpm/ won't exist in hoisted
mode — its try/catch already handles that gracefully. Trimming the
hoisted-mode transitive bloat (mongodb etc.) is a follow-up via
electron-builder extraResources filter; for now disk wins lose to
"Windows build actually exists."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@JohnMcLear JohnMcLear merged commit 39a96be into main May 12, 2026
5 checks passed
This was referenced May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant