From 2cada89ee961f328e2c4530d96bf5e1ef361748f Mon Sep 17 00:00:00 2001 From: Nyk <0xnykcd@googlemail.com> Date: Fri, 13 Mar 2026 12:50:15 +0700 Subject: [PATCH] fix(runtime): allow all Node versions >= 22 The version check was an allowlist of specific majors (22, 24). Changed to a >= 22 floor so future Node releases work without code changes. --- package.json | 2 +- scripts/check-node-version.mjs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0939a69..b1c0442 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "vitest": "^2.1.5" }, "engines": { - "node": "22.x || 24.x" + "node": ">=22" }, "keywords": [ "openclaw", diff --git a/scripts/check-node-version.mjs b/scripts/check-node-version.mjs index 3fe8a04..8ccdc7e 100644 --- a/scripts/check-node-version.mjs +++ b/scripts/check-node-version.mjs @@ -1,16 +1,15 @@ #!/usr/bin/env node -const SUPPORTED_NODE_MAJORS = [22, 24] +const MIN_NODE_MAJOR = 22 const current = process.versions.node const currentMajor = Number.parseInt(current.split('.')[0] || '', 10) -if (!SUPPORTED_NODE_MAJORS.includes(currentMajor)) { - const supported = SUPPORTED_NODE_MAJORS.map((major) => `${major}.x`).join(' or ') +if (currentMajor < MIN_NODE_MAJOR) { console.error( [ - `error: Mission Control supports Node ${supported}, but found ${current}.`, - 'use `nvm use 22` (recommended LTS) or `nvm use 24` before installing, building, or starting the app.', + `error: Mission Control requires Node ${MIN_NODE_MAJOR} or later, but found ${current}.`, + 'use `nvm use 22` (recommended LTS) or any later version before installing, building, or starting the app.', ].join('\n') ) process.exit(1)