fix(dashboard): stop Node 25 installs from failing at nanoid - #84397
fix(dashboard): stop Node 25 installs from failing at nanoid#84397fangliquanflq wants to merge 8 commits into
Conversation
fix(dashboard): stop Node 25 installs from failing at nanoid The new range
|
|
Thanks for the detailed review. I investigated each point and updated the branch:
While validating the complete path, I also merged current upstream Validation completed:
Pushed as |
Thanks for the thorough pass — the explicit rejection of unsupported semver syntax, the tightened odd-release wording, the prerelease handling, and the documented rationale for the managed-major check all address the points. Looks consistent; we'll re-check on the updated branch. |
What does this PR do?
Prevents
hermes dashboardinstalls on Node 25 from reaching a transitivenanoid@6engine failure with no Hermes-specific remediation. Hermes now declares the Node release lines its dependency tree actually supports, and both installers replace unsupported odd-numbered releases with the managed LTS runtime.Symptom
With
engine-strict=true, running the dashboard install under Node 25.2.1 and npm 11.6.2 fails withEBADENGINEatnanoid@6.0.0, whose Node range excludes Node 25. The former Hermes range,>=22.22.0, incorrectly advertised Node 25 as supported.Impact
Users who update or install the dashboard with Node 25 cannot complete the workspace dependency install. Without this change, the installer accepts that runtime and lets the failure surface later from a transitive dependency rather than selecting a working managed runtime.
Bug Cause
Trigger:
package.json:engines.nodeandscripts/install.sh:node_satisfies_build/scripts/install.ps1:Test-NodeVersionOkCausal chain:
nanoid@6supports Node 22, 24, and 26 or newer.nanoidEBADENGINEerror.Why it is wrong: Hermes's continuous minimum-version range was looser than the release-line compatibility of its dependency tree, and the installer duplicated the same overly broad policy.
Working sibling / contrast: Node 22.22+, Node 24, and Node 26+ satisfy both Hermes and the transitive dependency; the installers can also provision the supported managed Node 24 runtime.
Ruled out: Disabling
engine-strictlets the same dependency tree install, which rules out a missing package or dashboard build failure and isolates the failure to incompatible engine policy.Fix
Declare Node 22.22+, 24, and 26+ consistently in the root and Desktop manifests and their lockfile mirrors. Apply the same release-line policy in the POSIX and Windows installer preflight, emit actionable supported-line diagnostics, and add JavaScript invariants for manifest/lockfile alignment plus Python coverage for the managed runtime relationship.
Related Issue
Closes #84359
Type of Change
Changes Made
package.json,apps/desktop/package.json, andpackage-lock.json- align the declared Node engine range with supported release lines.scripts/install.shandscripts/install.ps1- reject unsupported odd-numbered Node releases and select the managed runtime with actionable diagnostics.tests-js/node-engine-alignment.test.ts- verify supported and rejected releases across manifests and lockfile mirrors.tests/test_engines_satisfiable.py- verify the managed installer runtime satisfies the declared range.How to Test
npm ci --ignore-scripts --no-audit --no-fundon the base revision and observe thenanoid@6.0.0EBADENGINEfailure.nanoiderror.npm exec --workspace tests-js -- vitest run node-engine-alignment.test.ts scripts/run_tests.sh tests/test_engines_satisfiable.py tests/hermes_cli/test_npm_engine.pyThe JavaScript suite passed 8 tests and the targeted Python suite passed 30 tests on the reviewed tip.
Checklist
Code
fix(scope):,feat(scope):, etc.)Documentation & Housekeeping
docs/, docstrings) - N/A; the supported range is declared in the package manifests and installer diagnosticscli-config.yaml.exampleif I added/changed config keys - N/A; no config keys changedCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows - N/A; no architecture or workflow changedScreenshots / Logs
Real-environment verification reproduced the base failure under Node 25.2.1 and confirmed that this branch rejects it at Hermes's own engine contract. POSIX and Windows installer gates both reject Node 25 and select the managed runtime.