chore(memory): correct BLK-005 + LRN-022 — pnpm 11.x line needs Node 22

Initial hypothesis ("pnpm@latest pulled a newer 11.4+ with new Node
floor") was wrong. Investigation after the second VPS crash showed
the whole pnpm 11.0+ line imports node:sqlite from its store-index
module. Local dev was misleading because pnpm install never re-ran
on the Node 20 host (lockfile already resolved, child scripts don't
load the store module).

Updates:
- BLK-005: replace single-fix line with iteration log
  (@latest → @11.1.3 → @10.13.1, last one resolved).
- LRN-022: rewrite headline + body to reflect pnpm 11 ↔ Node 22.13
  coupling, not just pnpm 11.4. Add pnpm/Node compat matrix.
- journal 2026-05-21: append v2 fix entry referencing commit 990c8e7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.7 committed 2026-05-21 06:16:08 +02:00
1 parent 990c8e700c
commit dbd2bf30e9
3 files changed
+17 -10

No files matched your search

+7 -3
View File
@@ -42,6 +42,10 @@ Status: resolved.
## BLK-005 | 2026-05-21 | Docker build crash — ERR_UNKNOWN_BUILTIN_MODULE node:sqlite
Friction: VPS `docker compose up --build -d` crashed on pnpm install (fresh cold build).
Root: Dockerfile:7 `corepack prepare pnpm@latest --activate` re-resolved to pnpm >=11.4. pnpm >=11.4 imports `node:sqlite` (Node 22.13+ only). Image `node:20-alpine` (Node 20.20.2) → `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite` at install start. Local dev unaffected — corepack cached older pnpm 11.1.3.
Fix: pin `pnpm@11.1.3` in Dockerfile:7 (matches host, lockfile v9 stays valid).
Status: resolved (commit 7dccde7).
Root: `node:20-alpine` (Node 20.20.2) cannot load pnpm 11.x — pnpm 11 itself imports `node:sqlite` from `../store/index/lib/index.js`, and `node:sqlite` is a Node 22.13+ built-in. Crash: `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite`. Local dev was deceptive — host runs Node 20 too, but `pnpm install` never ran on host (lockfile already resolved); `pnpm run typecheck` / `pnpm run test` only spawn child scripts and never load the store-index module.
Iterations:
1. `corepack prepare pnpm@latest` → fails (resolves to current pnpm 11.x).
2. `corepack prepare pnpm@11.1.3` → still fails (entire pnpm 11.x line needs Node 22.13).
3. `corepack prepare pnpm@10.13.1` → works. Last major before the node:sqlite cache backend; reads lockfile v9 unchanged; already cached on dev host.
Fix: Dockerfile:7 pinned to `pnpm@10.13.1`.
Status: resolved (commit 990c8e7).