Files
open-design/tools
lefarcenandGitHub 4c73aba565 fix(pack): align prebundle better-sqlite3 pin to 12.10.0 so mac daemon starts (#5680)
The packaged macOS daemon fails to start for a large share of users: it
exits code=1 at boot with ERR_MODULE_NOT_FOUND, `missing_module` =
better-sqlite3 (~270 hits / 4 days, dominant across 0.13.0–0.15.0). With
the daemon dead the whole app is unusable and the shell keeps retrying —
the "app keeps crashing / restarting" reports.

Root cause: mac-prebundle.ts / win-prebundle.ts pin the daemon's runtime
externals at `better-sqlite3@12.9.0`, but apps/daemon/package.json and
the pnpm lockfile resolve `12.10.0`. The assembled app declares 12.9.0
as a dependency; electron-builder 26's pnpm node_modules collector keeps
a dependency only when the on-disk version semver-satisfies the pin.
12.10.0 does not satisfy exact `12.9.0`, so the collector DROPS
better-sqlite3 from Contents/Resources/app/node_modules with a non-fatal
warning, and the prebundled daemon's `import Database from 'better-sqlite3'`
can't resolve at runtime. blake3-wasm (pinned 2.1.5, matching disk)
survives, which is why it only occasionally shows the same error.

Fix: bump the pin to 12.10.0 in both prebundle manifests to match the
daemon / lockfile. Unit assertions updated (red on main's 12.9.0, green
here).
2026-07-15 08:34:33 +00:00
..
2026-05-25 05:15:04 +00:00