From 39e7f290866ac2d47745c519a62f02cbc5959107 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 10:06:05 +0000 Subject: [PATCH] Declare the Node versions this project actually needs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01WaySiNst4HhDXBHnMy8p5G --- package-lock.json | 3 +++ package.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/package-lock.json b/package-lock.json index c1c1527..f8aec5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,9 @@ "tsx": "^4.23.1", "typescript": "~6.0.2", "vitest": "^4.0.8" + }, + "engines": { + "node": "^22.22.3 || ^24.15.0 || >=26.0.0" } }, "node_modules/@acemir/cssom": { diff --git a/package.json b/package.json index 563dedf..c138c64 100644 --- a/package.json +++ b/package.json @@ -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",