Skip to content

fix(release): exclude etherpad/bin/ from extraResources (Windows 7za)#51

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

fix(release): exclude etherpad/bin/ from extraResources (Windows 7za)#51
JohnMcLear merged 1 commit into
mainfrom
fix/release-exclude-etherpad-bin

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

v0.4.2 cleared deb / snap / macOS / Linux AppImage thanks to #47 + #49, but release-windows still fails. 7za reports many warnings during the NSIS .nsis.7z packaging:

```
.\resources\etherpad\bin\node_modules\ep_etherpad-lite\node_modules\async
: The system cannot find the path specified.
.\resources\etherpad\bin\node_modules\ep_etherpad-lite\node_modules\cookie-parser
: The system cannot find the path specified.
... 60+ more, one per dep ...
```

7za exits 1 on any warning, electron-builder treats that as failure, the NSIS .exe never builds.

Root cause

Etherpad's `bin/` directory is operator CLI utilities (compactPad, importSqlFile, migrateDB, …). Its `package.json` declares `ep_etherpad-lite: workspace:../src`, and the nested
`bin/node_modules/ep_etherpad-lite/node_modules/` paths are pnpm symlinks. tar -xz preserves them on extract; Linux/macOS follow them, Windows can't.

Fix

Exclude `bin/**` from `extraResources.filter`. `findBundledEtherpadDir` + `node/server.ts` only need `src/` at runtime — `bin/` was unused payload.

Out of scope (snap publish, requires manual action)

The snap build now succeeds (#49). But the snap-publish step still fails: `Issues while processing snap: - Waiting for previous upload(s) to complete their review process. ...go to the other upload(s) page in https://dashboard.snapcraft.io/ and click on the 'Reject and remove from review queue' button.` Earlier v0.4.0 / v0.4.1 attempts got stuck in store review. Once those are rejected on the Snap Store dashboard, the next snap publish will proceed automatically.

Test plan

  • Repo CI (lint/typecheck/test/e2e)
  • After merge: release-please cuts v0.4.3 → tag it → Release workflow's release-windows succeeds, draft v0.4.3 release contains `Etherpad-Desktop-Setup-0.4.3.exe` + `Etherpad-Desktop-0.4.3-portable.exe` + `latest.yml`.

🤖 Generated with Claude Code

The v0.4.2 release build cleared deb / snap / macOS / AppImage but
release-windows still failed. The 7za scan reports many warnings:

  .\resources\etherpad\bin\node_modules\ep_etherpad-lite\node_modules\async\
  : The system cannot find the path specified.
  (and the same for cookie-parser, cross-env, cross-spawn, ejs, esbuild,
   express, express-rate-limit, express-session, find-root, formidable,
   http-errors, jose, js-cookie, jsdom, jsonminify, jsonwebtoken, ...)

7za exits 1 on warnings, electron-builder treats that as a build
failure, and the NSIS .exe never gets produced.

Etherpad's `bin/` directory is operator CLI utilities (compactPad,
importSqlFile, migrateDB, etc.) that the embedded server never
invokes at runtime. Its package.json declares a workspace symlink to
`../src`, and the nested
  bin/node_modules/ep_etherpad-lite/node_modules/<dep>
paths are pnpm symlinks. Tar preserves them on extract; Linux/macOS
follow them, Windows can't.

Exclude `bin/**` from extraResources — findBundledEtherpadDir +
node/server.ts only need `src/`.

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 eb55314 into main May 12, 2026
6 of 7 checks passed
This was referenced May 12, 2026
JohnMcLear added a commit that referenced this pull request May 12, 2026
…ws) (#54)

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>
@github-actions github-actions Bot mentioned this pull request 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