mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
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:
@@ -30,7 +30,8 @@ describe("resolvePreferredNodePath", () => {
|
||||
throw new Error("missing");
|
||||
});
|
||||
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.1.0\n", stderr: "" });
|
||||
// Node 22.12.0+ is the minimum required version
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.12.0\n", stderr: "" });
|
||||
|
||||
const result = await resolvePreferredNodePath({
|
||||
env: {},
|
||||
@@ -51,7 +52,8 @@ describe("resolvePreferredNodePath", () => {
|
||||
throw new Error("missing");
|
||||
});
|
||||
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "18.19.0\n", stderr: "" });
|
||||
// Node 22.11.x is below minimum 22.12.0
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.11.0\n", stderr: "" });
|
||||
|
||||
const result = await resolvePreferredNodePath({
|
||||
env: {},
|
||||
@@ -92,7 +94,8 @@ describe("resolveSystemNodeInfo", () => {
|
||||
throw new Error("missing");
|
||||
});
|
||||
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.0.0\n", stderr: "" });
|
||||
// Node 22.12.0+ is the minimum required version
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.12.0\n", stderr: "" });
|
||||
|
||||
const result = await resolveSystemNodeInfo({
|
||||
env: {},
|
||||
@@ -102,7 +105,7 @@ describe("resolveSystemNodeInfo", () => {
|
||||
|
||||
expect(result).toEqual({
|
||||
path: darwinNode,
|
||||
version: "22.0.0",
|
||||
version: "22.12.0",
|
||||
supported: true,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user