Declare the Node versions this project actually needs
Angular 22 requires Node ^22.22.3 || ^24.15.0 || >=26.0.0, and package.json said nothing about it. On a machine half a patch below that floor — 22.22.2, which is what this development container has on PATH — every `ng` command refuses to start, so `npm test` and `npm run build` fail with a version error rather than a test failure. Nothing in the repository pointed at the cause; you had to already know. The range is Angular's, taken verbatim rather than guessed at, because it is the binding constraint. Every other direct dependency is looser and fully contained by it: vitest wants ^20 || ^22 || >=24, jsdom ^20.19 || ^22.12 || >=24, tsx >=18, typescript >=14.17, Playwright >=20. This moves the complaint earlier and makes it name the project. `npm ci` now prints EBADENGINE for star-map itself before anything is installed, instead of the first Angular command failing several steps later. It stays a warning rather than an error — turning it into one needs engine-strict in .npmrc, which would hard-fail installs on any unlisted version, and that is a stricter policy than this change is claiming to make. The lockfile carries the field too: npm mirrors the root package's engines into it, and a lockfile that disagrees with package.json is one npm has to resolve rather than trust. Regenerated with --package-lock-only, which changed those three lines and no dependency. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WaySiNst4HhDXBHnMy8p5G
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
},
|
||||
"private": true,
|
||||
"packageManager": "npm@11.12.1",
|
||||
"engines": {
|
||||
"node": "^22.22.3 || ^24.15.0 || >=26.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "^22.0.0",
|
||||
"@angular/compiler": "^22.0.0",
|
||||
|
||||
Reference in New Issue
Block a user