From ee45b1bf58afb56cbfd04faba06094b776466d07 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 12 May 2026 15:06:55 +0100 Subject: [PATCH] fix(release): exclude etherpad/bin/ from extraResources to unbreak Win MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/ 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) --- packages/desktop/build/electron-builder.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/desktop/build/electron-builder.yml b/packages/desktop/build/electron-builder.yml index 3639547..e8aaef7 100644 --- a/packages/desktop/build/electron-builder.yml +++ b/packages/desktop/build/electron-builder.yml @@ -39,6 +39,18 @@ extraResources: - '!**/tests/**' - '!**/.git/**' - '!**/playwright.config.ts' + # Etherpad's `bin/` directory contains operator CLI utilities + # (compactPad, importSqlFile, etc.) that the embedded server + # never invokes at runtime. Its package.json declares a pnpm + # workspace symlink to `../src`, and the nested + # `bin/node_modules/ep_etherpad-lite/node_modules/` paths + # are pnpm symlinks too. tar/zip preserves the symlinks but + # Windows file systems don't follow them after extraction, so + # 7za scan-fails with "system cannot find the path specified" + # for every dep and exits 1 (warning-as-error), breaking the + # Windows NSIS build. Excluding the whole dir is fine — + # findBundledEtherpadDir + node/server.ts only need src/. + - '!bin/**' asar: true asarUnpack: