Skip to content

Fix the npm ci break and pin the toolchain to the engines floor - #1

Merged
jacobprall merged 1 commit into
mainfrom
fix-ci-lockfile
Aug 5, 2026
Merged

Fix the npm ci break and pin the toolchain to the engines floor#1
jacobprall merged 1 commit into
mainfrom
fix-ci-lockfile

Conversation

@jacobprall

Copy link
Copy Markdown
Collaborator

Every CI run since the repository went public failed at npm ci, so verify and both nightly skills syncs never passed:

npm error Missing: typescript@5.9.3 from lock file

Cause

The lockfile was generated by npm 11 on Node 24, but the workflows run Node 22, whose bundled npm 10 resolves one optional peer differently. vite-tsconfig-paths pulled in tsconfck, which peers on typescript: ^5.0.0 against the root ^7.0.2, so npm 10 wanted a nested typescript@5.9.3 that the lockfile never recorded. It was invisible locally because development machines run npm 11 with a populated node_modules.

Fix

Remove vite-tsconfig-paths instead of papering over the resolution difference. It is deprecated, vitest resolves tsconfig paths natively now, and no tsconfig that vitest consults declares paths — the only mapping lives in tsconfig.typecheck.json, which tsc reads directly. That deletes the peer conflict at its source and drops a dead dependency.

The lockfile is regenerated with the npm bundled at the engines floor. npm ci now succeeds on npm 10.9.3, 10.9.8, and 11.11.0.

Also here

  • Transitive hono bumped past GHSA-8j4g-w8fx-2239, so npm audit --omit=dev reports zero findings.
  • Node pinned once in .nvmrc, read by both workflows, so CI keeps exercising the oldest supported npm.
  • New tests/package/lockfile.test.ts fails when the lockfile drifts out of sync with package.json, rather than leaving CI to discover it. Verified it fails on a deliberately desynced lockfile.

Verification

npm run verify passes with 64 tests (61 before, plus 3 new). npm pack --dry-run is unchanged at 94 files with no development leakage. Remaining audit findings are dev-only, inside @earendil-works/pi-coding-agent, and their only fix is a downgrade to 0.75.3 that would contradict the release-tested pin.

Made with Cursor

Every CI run since the repository went public failed at `npm ci`, so the verify
workflow and both nightly skills syncs never passed:

    npm error Missing: typescript@5.9.3 from lock file

The lockfile was generated by npm 11 on Node 24, but the workflows run Node 22,
whose bundled npm 10 resolves one optional peer differently: `vite-tsconfig-paths`
pulled in `tsconfck`, which peers on `typescript: ^5.0.0` against the root's
`^7.0.2`, so npm 10 wanted a nested copy the lockfile did not record.

Remove `vite-tsconfig-paths` rather than paper over the resolution difference. It
was deprecated, vitest already resolves tsconfig paths natively, and no tsconfig
consulted by vitest declares `paths` — the only mapping lives in
tsconfig.typecheck.json, which tsc reads directly. Dropping it deletes the peer
conflict at its source.

Regenerate the lockfile with the npm bundled at the `engines` floor; `npm ci` now
succeeds on npm 10.9.3, 10.9.8, and 11.11.0. Bump the transitive `hono` past
GHSA-8j4g-w8fx-2239, clearing production audit findings.

Pin Node once in .nvmrc and have both workflows read it, so CI keeps exercising
the oldest supported npm, and add a test that fails when the lockfile drifts out
of sync with package.json instead of leaving CI to discover it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jacobprall
jacobprall merged commit 6903431 into main Aug 5, 2026
1 check passed
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