fix(runtime): bump minimum Node.js version to 22.12.0 (#5370)

* fix(runtime): bump minimum Node.js version to 22.12.0

Aligns the runtime guard with the declared package.json engines requirement.

The Matrix plugin (and potentially others) requires Node >= 22.12.0,
but the runtime guard previously allowed 22.0.0+. This caused confusing
errors like 'Cannot find module @vector-im/matrix-bot-sdk' when the real
issue was an unsupported Node version.

- Update MIN_NODE from 22.0.0 to 22.12.0
- Update error message to reflect the correct version
- Update tests to use 22.12.0 as the minimum valid version

Fixes #5292

* fix: update test versions to match MIN_NODE=22.12.0

---------

Co-authored-by: Markus Glucksberg <markus@glucksberg.com>
This commit is contained in:
Glucksberg
2026-02-05 17:42:52 -04:00
committed by GitHub
parent db8e9b37c6
commit 2ca78a8aed
3 changed files with 20 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ type Semver = {
patch: number;
};
const MIN_NODE: Semver = { major: 22, minor: 0, patch: 0 };
const MIN_NODE: Semver = { major: 22, minor: 12, patch: 0 };
export type RuntimeDetails = {
kind: RuntimeKind;
@@ -88,7 +88,7 @@ export function assertSupportedRuntime(
runtime.error(
[
"openclaw requires Node >=22.0.0.",
"openclaw requires Node >=22.12.0.",
`Detected: ${runtimeLabel} (exec: ${execLabel}).`,
`PATH searched: ${details.pathEnv}`,
"Install Node: https://nodejs.org/en/download",