Skip to content

Comments

Fix installer Node runtime mismatch#68

Open
rolandkakonyi wants to merge 1 commit intoopenclaw:mainfrom
rolandkakonyi:codex/fix-21126-installer-node-path
Open

Fix installer Node runtime mismatch#68
rolandkakonyi wants to merge 1 commit intoopenclaw:mainfrom
rolandkakonyi:codex/fix-21126-installer-node-path

Conversation

@rolandkakonyi
Copy link

@rolandkakonyi rolandkakonyi commented Feb 19, 2026

Summary

  • Problem: install.sh can leave openclaw bound to an older node (for example nvm Node 20), even after installing Node 22.
  • Why it matters: users finish install successfully but openclaw immediately fails with openclaw requires Node >=22.12.0.
  • What changed:
    • Added Node runtime selection logic to prefer/activate a supported Node (>=22) for installer operations.
    • Added a compatibility shim step for npm installs that writes an openclaw launcher using the selected Node 22 runtime when original shell PATH still points to unsupported Node.
    • Added a hard guard in install flow to fail early if Node 22 cannot be activated.
  • What did NOT change: no changes to package contents in openclaw itself; this PR only updates installer behavior in openclaw.ai.

Linked Issue/PR

Verification

  • Reproduced failure in Docker (ubuntu:24.04) with nvm Node 20 active before running installer.
  • Re-ran same repro against patched local install.sh:
    • installer now reports Using Node.js runtime at /usr/bin/node
    • shim created in original node bin dir
    • openclaw --version succeeds
    • openclaw config set gateway.mode local succeeds
  • Ran shellcheck -s bash public/install.sh after changes (clean).

Risk / Rollback

  • Risk: wrapper shim placement could surprise users with custom PATH setups.
  • Mitigation: shim is only created when original PATH does not provide supported Node; otherwise no shim is written.
  • Rollback: revert this PR to restore previous installer behavior.

AI-Assisted Contribution

  • Agent/tool: GPT-5.3-Codex (High reasoning)
  • Intent summary:
    • Reproduce issue #21126 with Docker + nvm Node 20 environment.
    • Implement installer-side fix ensuring Node >=22 is used for install and for post-install openclaw invocation.
    • Validate with before/after repro runs and shellcheck.
  • Human verification:
    • Reviewed code diff and runtime behavior.
    • Confirmed successful commands and logs after patch.

Companion Test PR

Ensure install.sh uses Node >=22 for npm install steps even when
nvm Node 20 is first on PATH. Add a compatibility shim so the
installed openclaw command still runs via a supported Node runtime
in mixed-version shells.

Also fixes shellcheck warning in shim log output.
@vercel
Copy link

vercel bot commented Feb 19, 2026

@rolandkakonyi is attempting to deploy a commit to the Jamie's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant