Skip to content

fix(ci): install the packed packages with npm 11 on Node 20 - #1905

Open
chphch wants to merge 1 commit into
slopus:mainfrom
chphch:fix/ci-node20-npm11
Open

chphch wants to merge 1 commit into
slopus:mainfrom
chphch:fix/ci-node20-npm11

Conversation

@chphch

@chphch chphch commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Since 2026-10-15 the smoke-test-linux (20) job fails at "Install packed packages globally": npm exits with Cannot read properties of null (reading 'edgesOut') before installing anything, so every run of the CLI Smoke Test fails on that leg (#1850 has failed this way on each push since 2026-10-16). The crash is a bug in npm 10, the npm that Node 20 ships, and npm fixed it in 11.6.0 (npm/cli#9787, the same defect as npm/cli#8261). The Node 24 leg already runs npm 11, so this PR upgrades npm on the Node 20 leg right before the global install.

Why it started on 2026-10-15

Nothing in this repo changed. The install reaches the npm bug through happy-server-self-host → privacy-kit → vite-tsconfig-paths, whose optional peer chain (vite, @vitejs/devtools) ends at vitest. vitest 4.1.12 was published on 2026-10-15 between 14:41 and 14:51 UTC, and @vitest/browser-webdriverio 4.1.12 was not, so npm 10 builds a peer set that mixes 4.1.12 and 4.1.11 and crashes in #loadPeerSet.

The ERESOLVE warning printed just before the crash (the Prisma pair from #1723) is a separate problem: with pglite-prisma-adapter pinned to 0.6.1 the warning goes away and the crash stays.

Proof

Reproduced on Linux x64 with node v20.20.2 and npm 10.8.2, the runner's versions, using packs built from main (b3b9fa2) by this workflow's own build and pack steps:

Install npm Result
the workflow's npm install -g of the three packs 10.8.2 crash (2 of 2 runs)
npm install -g happy-server-self-host@1.1.11 from the registry 10.8.2 crash
either install above, with --before=2026-10-15T14:40:00Z 10.8.2 passes
either install above, with --before=2026-10-15T14:53:00Z 10.8.2 crash
the workflow's install 10.9.9 (latest 10.x) crash
the workflow's install 11.21.1 passes

With the step from this PR applied to a fresh Node 20.20.2 (npm install -g npm@^11.6.0 upgrades its own npm from 10.8.2 to 11.21.1), the workflow's install passes, and so do the job's remaining steps: happy --help, --version, doctor, daemon status, and happy server booting and answering /v1/auth/request/status. The CI run on this PR is the end-to-end check.

--legacy-peer-deps avoids the crash as well. I left it out because it changes how npm resolves the tree, which is what this job tests. Anyone who installs happy-server-self-host with npm 10 hits the same crash today, and npm install -g npm@11 is the workaround for them too.

🤖 Generated with Claude Code

The Linux smoke test on Node 20 fails at "Install packed packages
globally" on every run since 2026-10-15: npm exits with "Cannot read
properties of null (reading 'edgesOut')" before installing anything.

The crash is a bug in npm 10, the npm that Node 20 ships, and npm fixed
it in 11.6.0 (npm/cli#9787, the same defect as npm/cli#8261). This
install reaches it through happy-server-self-host, privacy-kit and
vite-tsconfig-paths, whose optional peer chain (vite, @vitejs/devtools)
ends at vitest. vitest 4.1.12 was published on 2026-10-15 without
@vitest/browser-webdriverio 4.1.12, and npm 10 crashes on the peer set
that mixes the two releases.

Reproduced with node v20.20.2 and npm 10.8.2, the runner's versions.
The workflow's install crashes, and so does `npm install -g
happy-server-self-host@1.1.11` from the registry. Limiting npm to
versions published before 2026-10-15 14:40 UTC makes both pass, and
before 14:53 UTC both crash again. npm 10.9.9 crashes too; npm 11.21.1
passes, and with it so do the job's remaining steps (`happy --help`,
`happy doctor`, and `happy server` answering its Prisma-backed request).
The Node 24 leg already runs npm 11 (11.19.0), so the Node 20 leg now
upgrades npm to match.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@chphch

chphch commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@bra1nDump: the CLI Smoke Test's smoke-test-linux (20) leg has failed on every run since Oct 15, so every PR that touches the CLI, server or wire will show red on that leg until this lands. Nothing in the repo changed. vitest 4.1.12 was published that day without a matching @vitest/browser-webdriverio (still unpublished today), and npm 10, the one Node 20 ships, crashes on the mixed peer set. This PR moves that leg to npm 11, which fixed the crash: 7 added lines in one workflow file, and its own CI run is green. The same crash hits anyone installing happy-server-self-host with npm 10 today, and npm install -g npm@11 is their workaround.

Two more small fixes for things that fail on main today:

PR What fails on main Size
#1891 messageMeta.test.ts still expects gpt-5.6-sol, so it has failed since #1885 moved the Codex default to gpt-6.1-sol. App CI only typechecks, so nothing flagged it. +1/-1
#1899 On Node 26, a fresh pnpm install with a pnpm that bundles no node-gyp stops at better-sqlite3's build script, and happy-server's prisma generate never runs. The package is allow-listed only because the removed Codium package needed it; nothing imports it now. +3/-1

If you have room in the same pass, two fixes for bugs users hit on main today:

PR What happens on main Size
#1898 The app re-reads git status in the agent's working tree after every agent state change, and git status / git diff take .git/index.lock to refresh the index. An agent's git commit or git rebase that needs the lock at that moment dies with Unable to create '.git/index.lock': File exists. 3 files, +104/-6
#1853 After a daemon restart, which every CLI upgrade does, stopping a session from the app reports success while the session keeps running. The daemon's "Session not found" comes back as an ordinary reply, so the fallbacks never run. 2 files, +45/-1

Every PR above, this one included, merges cleanly with green checks.

This branch has not been deployed

No deployments
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