build: align Node 22 guidance with 22.16 minimum
This commit is contained in:
@@ -251,8 +251,8 @@ Designed for environments where you want everything under a local prefix (defaul
|
||||
<Step title="Ensure PowerShell + Windows environment">
|
||||
Requires PowerShell 5+.
|
||||
</Step>
|
||||
<Step title="Ensure Node.js 22+">
|
||||
If missing, attempts install via winget, then Chocolatey, then Scoop.
|
||||
<Step title="Ensure Node.js 24 by default">
|
||||
If missing, attempts install via winget, then Chocolatey, then Scoop. Node 22 LTS, currently `22.16+`, remains supported for compatibility.
|
||||
</Step>
|
||||
<Step title="Install OpenClaw">
|
||||
- `npm` method (default): global npm install using selected `-Tag`
|
||||
|
||||
@@ -14,7 +14,7 @@ This guide covers the necessary steps to build and run the OpenClaw macOS applic
|
||||
Before building the app, ensure you have the following installed:
|
||||
|
||||
1. **Xcode 26.2+**: Required for Swift development.
|
||||
2. **Node.js 22+ & pnpm**: Required for the gateway, CLI, and packaging scripts.
|
||||
2. **Node.js 24 & pnpm**: Recommended for the gateway, CLI, and packaging scripts. Node 22 LTS, currently `22.16+`, remains supported for compatibility.
|
||||
|
||||
## 1. Install Dependencies
|
||||
|
||||
|
||||
@@ -1380,7 +1380,7 @@ ensure_default_node_active_shell() {
|
||||
echo "Then open a new shell and rerun:"
|
||||
echo " curl -fsSL https://openclaw.ai/install.sh | bash"
|
||||
else
|
||||
echo "Install/select Node.js 22+ and ensure it is first on PATH, then rerun installer."
|
||||
echo "Install/select Node.js ${NODE_DEFAULT_MAJOR} (or Node ${NODE_MIN_VERSION}+ minimum) and ensure it is first on PATH, then rerun installer."
|
||||
fi
|
||||
|
||||
return 1
|
||||
@@ -1477,7 +1477,7 @@ install_node() {
|
||||
fi
|
||||
else
|
||||
ui_error "Could not detect package manager"
|
||||
echo "Please install Node.js 22+ manually: https://nodejs.org"
|
||||
echo "Please install Node.js ${NODE_DEFAULT_MAJOR} manually (or Node ${NODE_MIN_VERSION}+ minimum): https://nodejs.org"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ export async function maybeRepairGatewayServiceConfig(
|
||||
note(warning, "Gateway runtime");
|
||||
}
|
||||
note(
|
||||
"System Node 22+ not found. Install via Homebrew/apt/choco and rerun doctor to migrate off Bun/version managers.",
|
||||
"System Node 22 LTS (22.16+) or Node 24 not found. Install via Homebrew/apt/choco and rerun doctor to migrate off Bun/version managers.",
|
||||
"Gateway runtime",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,9 @@ async function resolveBinaryPath(binary: string): Promise<string> {
|
||||
if (binary === "bun") {
|
||||
throw new Error("Bun not found in PATH. Install bun: https://bun.sh");
|
||||
}
|
||||
throw new Error("Node not found in PATH. Install Node 22+.");
|
||||
throw new Error(
|
||||
"Node not found in PATH. Install Node 24 (recommended) or Node 22 LTS (22.16+).",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ describe("resolveSystemNodeInfo", () => {
|
||||
"/Users/me/.fnm/node-22/bin/node",
|
||||
);
|
||||
|
||||
expect(warning).toContain("below the required Node 22+");
|
||||
expect(warning).toContain("below the required Node 22.16+");
|
||||
expect(warning).toContain(darwinNode);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -151,7 +151,7 @@ export function renderSystemNodeWarning(
|
||||
}
|
||||
const versionLabel = systemNode.version ?? "unknown";
|
||||
const selectedLabel = selectedNodePath ? ` Using ${selectedNodePath} for the daemon.` : "";
|
||||
return `System Node ${versionLabel} at ${systemNode.path} is below the required Node 22+.${selectedLabel} Install Node 22+ from nodejs.org or Homebrew.`;
|
||||
return `System Node ${versionLabel} at ${systemNode.path} is below the required Node 22.16+.${selectedLabel} Install Node 24 (recommended) or Node 22 LTS from nodejs.org or Homebrew.`;
|
||||
}
|
||||
export { resolveStableNodePath };
|
||||
|
||||
|
||||
@@ -362,7 +362,7 @@ async function auditGatewayRuntime(
|
||||
issues.push({
|
||||
code: SERVICE_AUDIT_CODES.gatewayRuntimeNodeSystemMissing,
|
||||
message:
|
||||
"System Node 22+ not found; install it before migrating away from version managers.",
|
||||
"System Node 22 LTS (22.16+) or Node 24 not found; install it before migrating away from version managers.",
|
||||
level: "recommended",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user