You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cd7e34e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli): scaffolds declare vitest ~4.0.0 so npm install works on npm 10
SCAFFOLD_VITEST_RANGE moves from ^4.0.0 to ~4.0.0. With ^4.0.0, npm 10
(Node 22's bundled major) crashes in arborist #loadPeerSet with
"Cannot read properties of null (reading 'edgesOut')": vitest 4.1.x
admits vite 8, whose optional @vitejs/devtools peer leads to a
vitest@* peer that resolves to vitest's latest and contradicts the
root vitest. vitest 4.0.x admits only vite 6 or 7, which declare no
such peer. The comment beside the constant records the measured cause,
why ^5.0.0 is not the fix, and the re-check that lets it move back.
Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6
Co-authored-by: Claude <noreply@anthropic.com>
fix(cli): plugin scaffolds declare `vitest ~4.0.0`, so `npm install` works on npm 10
6
+
7
+
Clause-②: no
8
+
9
+
`objectstack init -t plugin` and `objectstack create plugin` now declare `vitest ~4.0.0` instead of `^4.0.0`. With `^4.0.0`, a fresh `npm install` of the emitted project crashed on npm 10, the npm that Node 22 bundles, with `Cannot read properties of null (reading 'edgesOut')`. npm 11 was not affected.
10
+
11
+
The cause is upstream. vitest 4.1.x accepts vite 8, and vite 8's optional devtools peers lead back to a `vitest@*` peer that npm 10 cannot resolve against an older vitest at the root. vitest 4.0.x accepts only vite 6 or 7, which carry no such peer. A scaffolded project now installs vitest 4.0.18 with vite 7.3.7 on npm 10 and npm 11.
12
+
13
+
Projects that were already scaffolded are unchanged. If one of them fails to install on npm 10, change its `vitest` devDependency to `~4.0.0`, or install with npm 11.
0 commit comments