From 4b7a5a4e8b4a5709b402d65753a55a8f4e67e2a5 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 10 Jul 2026 19:28:49 -0700 Subject: [PATCH] fix(installer): default to Node 22.22.2 (#104073) --- docs/install/installer.md | 4 ++-- scripts/install-cli.sh | 6 +++--- test/scripts/install-cli.test.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/install/installer.md b/docs/install/installer.md index 4f7e5915fa43..a180c603a7ea 100644 --- a/docs/install/installer.md +++ b/docs/install/installer.md @@ -197,7 +197,7 @@ by default, plus git-checkout installs under the same prefix flow. - Downloads a pinned supported Node LTS tarball (the version is embedded in the script and updated independently, default `22.22.0`) to `/tools/node-v` and verifies SHA-256. + Downloads a pinned supported Node LTS tarball (the version is embedded in the script and updated independently, default `22.22.2`) to `/tools/node-v` and verifies SHA-256. On Alpine/musl Linux, where Node does not publish compatible tarballs for the pinned runtime, installs `nodejs` and `npm` with `apk` and links that runtime into the prefix wrapper path. The Alpine repositories must provide a supported Node version (22.19+, 23.11+, or 24+); use Alpine 3.21 or newer if older repositories only provide Node 20 or 21. @@ -256,7 +256,7 @@ by default, plus git-checkout installs under the same prefix flow. | `--git \| --github` | Shortcut for git method | | `--git-dir \| --dir ` | Git checkout directory (default: `~/openclaw`) | | `--version ` | OpenClaw version or dist-tag (default: `latest`) | -| `--node-version ` | Node version (default: `22.22.0`) | +| `--node-version ` | Node version (default: `22.22.2`) | | `--json` | Emit NDJSON events | | `--onboard` | Run `openclaw onboard` after install | | `--no-onboard` | Skip onboarding (default) | diff --git a/scripts/install-cli.sh b/scripts/install-cli.sh index b6ae8bb93025..21ccc7e80a3b 100755 --- a/scripts/install-cli.sh +++ b/scripts/install-cli.sh @@ -64,7 +64,7 @@ resolve_openclaw_effective_home() { OPENCLAW_EFFECTIVE_HOME="$(resolve_openclaw_effective_home)" PREFIX="${OPENCLAW_PREFIX:-${HOME}/.openclaw}" OPENCLAW_VERSION="${OPENCLAW_VERSION:-latest}" -NODE_VERSION="${OPENCLAW_NODE_VERSION:-22.22.0}" +NODE_VERSION="${OPENCLAW_NODE_VERSION:-22.22.2}" NODE_VERSION_REQUESTED=0 if [[ -n "${OPENCLAW_NODE_VERSION:-}" ]]; then NODE_VERSION_REQUESTED=1 @@ -92,7 +92,7 @@ Usage: install-cli.sh [options] --git, --github Shortcut for --install-method git --git-dir, --dir Checkout directory (default: ~/openclaw, or \$OPENCLAW_HOME/openclaw) --version OpenClaw version (default: latest) - --node-version Node version (default: 22.22.0) + --node-version Node version (default: 22.22.2) --onboard Run "openclaw onboard" after install --no-onboard Skip onboarding (default) --set-npm-prefix Force npm prefix to ~/.npm-global if current prefix is not writable (Linux) @@ -863,7 +863,7 @@ install_node() { local required_version installed_version="$("$(node_bin)" -v 2>/dev/null || echo unknown)" required_version="$(required_node_version)" - fail "Installed Node ${NODE_VERSION} must provide Node >= ${required_version} with node:sqlite; found ${installed_version}. Re-run with --node-version 22.22.0 (or newer)" + fail "Installed Node ${NODE_VERSION} must provide Node >= ${required_version} with node:sqlite; found ${installed_version}. Re-run with --node-version 22.22.2 (or newer)" fi emit_json "{\"event\":\"step\",\"name\":\"node\",\"status\":\"ok\",\"version\":\"${NODE_VERSION}\"}" } diff --git a/test/scripts/install-cli.test.ts b/test/scripts/install-cli.test.ts index d4d82b06eaaf..3ae753545693 100644 --- a/test/scripts/install-cli.test.ts +++ b/test/scripts/install-cli.test.ts @@ -1060,7 +1060,7 @@ describe("install-cli.sh", () => { const tmp = mkdtempSync(join(tmpdir(), "openclaw-install-cli-freshness-")); const prefix = join(tmp, "prefix"); const home = join(tmp, "home"); - const nodeBin = join(prefix, "tools/node-v22.22.0/bin"); + const nodeBin = join(prefix, "tools/node-v22.22.2/bin"); const argsLog = join(tmp, "npm-args.log"); mkdirSync(nodeBin, { recursive: true }); mkdirSync(home, { recursive: true }); @@ -1096,7 +1096,7 @@ describe("install-cli.sh", () => { const prefix = join(tmp, "prefix"); const home = join(tmp, "home"); const project = join(tmp, "project"); - const nodeBin = join(prefix, "tools/node-v22.22.0/bin"); + const nodeBin = join(prefix, "tools/node-v22.22.2/bin"); const argsLog = join(tmp, "npm-args.log"); mkdirSync(nodeBin, { recursive: true }); mkdirSync(home, { recursive: true });