Nyk commited on
Commit
34b97d9
·
1 Parent(s): 8965499

fix(runtime): allow all Node versions >= 22

Browse files

The version check was an allowlist of specific majors (22, 24).
Changed to a >= 22 floor so future Node releases work without
code changes.

Files changed (2) hide show
  1. package.json +1 -1
  2. scripts/check-node-version.mjs +4 -5
package.json CHANGED
@@ -66,7 +66,7 @@
66
  "vitest": "^2.1.5"
67
  },
68
  "engines": {
69
- "node": "22.x || 24.x"
70
  },
71
  "keywords": [
72
  "openclaw",
 
66
  "vitest": "^2.1.5"
67
  },
68
  "engines": {
69
+ "node": ">=22"
70
  },
71
  "keywords": [
72
  "openclaw",
scripts/check-node-version.mjs CHANGED
@@ -1,16 +1,15 @@
1
  #!/usr/bin/env node
2
 
3
- const SUPPORTED_NODE_MAJORS = [22, 24]
4
 
5
  const current = process.versions.node
6
  const currentMajor = Number.parseInt(current.split('.')[0] || '', 10)
7
 
8
- if (!SUPPORTED_NODE_MAJORS.includes(currentMajor)) {
9
- const supported = SUPPORTED_NODE_MAJORS.map((major) => `${major}.x`).join(' or ')
10
  console.error(
11
  [
12
- `error: Mission Control supports Node ${supported}, but found ${current}.`,
13
- 'use `nvm use 22` (recommended LTS) or `nvm use 24` before installing, building, or starting the app.',
14
  ].join('\n')
15
  )
16
  process.exit(1)
 
1
  #!/usr/bin/env node
2
 
3
+ const MIN_NODE_MAJOR = 22
4
 
5
  const current = process.versions.node
6
  const currentMajor = Number.parseInt(current.split('.')[0] || '', 10)
7
 
8
+ if (currentMajor < MIN_NODE_MAJOR) {
 
9
  console.error(
10
  [
11
+ `error: Mission Control requires Node ${MIN_NODE_MAJOR} or later, but found ${current}.`,
12
+ 'use `nvm use 22` (recommended LTS) or any later version before installing, building, or starting the app.',
13
  ].join('\n')
14
  )
15
  process.exit(1)