Spaces:
Sleeping
Sleeping
Nyk commited on
Commit ·
34b97d9
1
Parent(s): 8965499
fix(runtime): allow all Node versions >= 22
Browse filesThe 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 +1 -1
- 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
|
| 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
|
| 4 |
|
| 5 |
const current = process.versions.node
|
| 6 |
const currentMajor = Number.parseInt(current.split('.')[0] || '', 10)
|
| 7 |
|
| 8 |
-
if (
|
| 9 |
-
const supported = SUPPORTED_NODE_MAJORS.map((major) => `${major}.x`).join(' or ')
|
| 10 |
console.error(
|
| 11 |
[
|
| 12 |
-
`error: Mission Control
|
| 13 |
-
'use `nvm use 22` (recommended LTS) or
|
| 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)
|