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)