fix(release): exclude etherpad/bin/ from extraResources (Windows 7za)#51
Merged
Conversation
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>
ⓘ 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. |
2 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
🤖 Generated with Claude Code