fix(ci): stop compiling better-sqlite3 from source on Node 24 - #3378
Merged
Conversation
better-sqlite3 11.10.0 ships no `node-v137` (Node 24) prebuild, so every CI
install fell through `prebuild-install` to `node-gyp rebuild`, which downloads
the Node headers from nodejs.org mid-install. When that request stalls the whole
install dies:
prebuild-install warn install No prebuilt binaries found (target=24.13.0 ...)
gyp ERR! stack AggregateError [ETIMEDOUT]
[ELIFECYCLE] Command failed with exit code 1
Bump better-sqlite3 to ^12.11.1, which publishes node-v137 (and v127/v141/v147)
prebuilds, so installs fetch a binary instead of compiling. 12.0.0 was a
build-matrix-only major (dropped EOL Node 18 / Electron 26-28); the JS API is
unchanged and Electron 35 (ABI 133) prebuilds are still published.
Also cache the pnpm store in the tests workflow, matching the release/alpha
workflows: OpenWork Tests was re-downloading all 1453 packages every run
("reused 0"), which is both slow and extra network surface to flake on.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
src-opn
approved these changes
Jul 31, 2026
Member
Author
CI evidenceRun 1 — the compile is gone (job 91135979688): Run 2 — the store cache is doing its job (job 91137548193): better-sqlite3 doesn't even run its install script on the cached run. All checks green on both runs, including |
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.
The failure
OpenWork Testson Linux dies duringpnpm install --frozen-lockfile(e.g. #3371, run 30575171143):Root cause
better-sqlite3@11.10.0publishes prebuilds fornode-v108/115/127/131— nonode-v137, which is Node 24. Every CI job runsnode-version: 24, soprebuild-installalways missed, fell back tonode-gyp rebuild, and reached out tonodejs.orgfor headers mid-install. Any hiccup on that request fails the whole install. It was never green-by-design, just green-when-the-network-cooperated.Fix
better-sqlite3to^12.11.1inapps/serverandapps/desktop. That release shipsnode-v127/137/141/147andelectron-v133(we're on Electron 35) prebuilds, so installs download a binary instead of compiling.12.0.0was a build-matrix-only major (dropped EOL Node 18 / Electron 26-28) — no JS API change, and our usage isnew Database()+prepare()inapps/server/src/opencode-db.ts.13.x: it just landed (2026-07-29) and switches to N-API, which also tripsminimumReleaseAge: 4320.ci-tests.yml(same pattern already used byalpha-macos-aarch64.yml/release-macos-aarch64.yml) and install with--prefer-offline. The log showedreused 0on every progress line — CI was re-downloading all 1453 packages each run, which is both slow and more network to flake on.Verification
Run locally on the
devbase in a fresh worktree (macOS arm64):pnpm install --frozen-lockfilebetter-sqlite3 install: Donein seconds,build/Release/better_sqlite3.nodepresent with noobj.targetcompile artifacts — prebuild path, no node-gypnode -e "new (require('better-sqlite3'))(':memory:')..."sqlite 3.53.2 | node 25.2.1pnpm --filter openwork-server testpnpm --filter @openwork/desktop testpnpm check:outbound-accesspnpm --filter @openwork/desktop typecheck:electronpnpm --filter @openwork/app testdev, unrelated:message-list-loading.test.tsxfails only inside the full-suite run (target.addEventListener is not a functionfrom a DOM global clobbered by another file) and passes in isolation;dev's own CI run is green on this laneThe real proof for this change is this PR's own
OpenWork Testsrun: the install step should no longer printNo prebuilt binaries found/gypoutput at all.No user-visible surface changes (dependency + workflow only), so no fraimz was recorded — per the agreement in the request, CI green plus the local runs above is the evidence.