openclaw - 💡(How to fix) Fix [Bug]: install.sh unconditionally runs install_homebrew on macOS even when adequate Node is already present

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

install.sh calls install_homebrew unconditionally before any Node version check, so users without Homebrew (and without macOS admin rights) cannot install OpenClaw even when they already have a Node runtime that satisfies the script's own minimum.

Root Cause

[1/3] Preparing environment
· Homebrew not found, installing
· Installing Homebrew
✗ Installing Homebrew failed — re-run with --verbose for details
Warning: Running in non-interactive mode because `stdin` is not a TTY.
==> Checking for `sudo` access (which may request your password)...
Need sudo access on macOS (e.g. the user dacoliveira needs to be an Administrator)!

Fix Action

Fix / Workaround

install.sh then exits before Node detection runs. Workaround: bypass the installer entirely with npm i -g openclaw@latest (with the usual npm config set prefix ~/.npm-global permission workaround). That path completes cleanly and produces a working CLI, confirming brew is not actually required when Node is already present.

Impact and severity

Medium. Blocks first-run install for any macOS user without admin/sudo and without Homebrew, even when they already have an adequate Node. Workaround exists (npm i -g openclaw@latest with manual prefix), but it's undocumented from the install page and requires understanding npm prefix permissions.

Code Example

[1/3] Preparing environment
· Homebrew not found, installing
· Installing Homebrew
Installing Homebrew failed — re-run with --verbose for details
Warning: Running in non-interactive mode because `stdin` is not a TTY.
==> Checking for `sudo` access (which may request your password)...
Need sudo access on macOS (e.g. the user dacoliveira needs to be an Administrator)!

---

🦞 OpenClaw Installer
Detected: macos
Install plan
OS: macos
Install method: npm
Requested version: latest
Onboarding: skipped

[1/3] Preparing environment
· Homebrew not found, installing
· Installing Homebrew
Installing Homebrew failed — re-run with --verbose for details
Need sudo access on macOS (e.g. the user dacoliveira needs to be an Administrator)!

---

load_nvm_for_node_detection
if ! check_node; then
  install_homebrew      # only macOS users without adequate Node need brew
  install_node
fi
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

install.sh calls install_homebrew unconditionally before any Node version check, so users without Homebrew (and without macOS admin rights) cannot install OpenClaw even when they already have a Node runtime that satisfies the script's own minimum.

Steps to reproduce

  1. macOS account without admin/sudo and without Homebrew.
  2. Have Node ≥22.14 already on PATH (e.g. /usr/local/bin/node v24.15.0).
  3. Run curl -fsSL https://openclaw.ai/install.sh | bash.
  4. Installer reaches the Homebrew step, tries to install Homebrew, and aborts.

Expected behavior

The installer should detect that the existing Node already satisfies NODE_MIN_VERSION (22.14) and skip install_homebrew entirely, since brew is only needed downstream to install node@24 when Node is missing or outdated.

Actual behavior

scripts/install.sh calls install_homebrew in main() (around the "[1/3] Preparing environment" stage) before any check_node call. On a non-admin macOS without brew, this fails with:

[1/3] Preparing environment
· Homebrew not found, installing
· Installing Homebrew
✗ Installing Homebrew failed — re-run with --verbose for details
Warning: Running in non-interactive mode because `stdin` is not a TTY.
==> Checking for `sudo` access (which may request your password)...
Need sudo access on macOS (e.g. the user dacoliveira needs to be an Administrator)!

install.sh then exits before Node detection runs. Workaround: bypass the installer entirely with npm i -g openclaw@latest (with the usual npm config set prefix ~/.npm-global permission workaround). That path completes cleanly and produces a working CLI, confirming brew is not actually required when Node is already present.

OpenClaw version

install.sh from https://openclaw.ai/install.sh as of 2026-05-17 (would install 2026.5.12 (f066dd2))

Operating system

macOS 15.x (Darwin 25.4.0)

Install method

curl -fsSL https://openclaw.ai/install.sh | bash (canonical one-liner)

Model

N/A (installation phase, no model invoked)

Provider / routing chain

N/A

Additional provider/model setup details

N/A

Logs, screenshots, and evidence

🦞 OpenClaw Installer
✓ Detected: macos
Install plan
OS: macos
Install method: npm
Requested version: latest
Onboarding: skipped

[1/3] Preparing environment
· Homebrew not found, installing
· Installing Homebrew
✗ Installing Homebrew failed — re-run with --verbose for details
Need sudo access on macOS (e.g. the user dacoliveira needs to be an Administrator)!

Impact and severity

Medium. Blocks first-run install for any macOS user without admin/sudo and without Homebrew, even when they already have an adequate Node. Workaround exists (npm i -g openclaw@latest with manual prefix), but it's undocumented from the install page and requires understanding npm prefix permissions.

Hits hardest in: shared/family Macs (kid accounts), corporate-locked Macs, accounts where Homebrew was intentionally avoided.

Suggested fix

Reorder main() so install_homebrew is only called when install_node would actually need brew:

load_nvm_for_node_detection
if ! check_node; then
  install_homebrew      # only macOS users without adequate Node need brew
  install_node
fi

Or move install_homebrew inside install_node where its dependency actually lives.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The installer should detect that the existing Node already satisfies NODE_MIN_VERSION (22.14) and skip install_homebrew entirely, since brew is only needed downstream to install node@24 when Node is missing or outdated.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING