Skip to content

run.sh fails to launch on macOS when Node is installed via Homebrew #7802

@formed2forge

Description

@formed2forge

Describe the bug
Running ./run.sh (or ./run.sh --yolo) aborts during the agent runtime preparation step with a dyld library-not-loaded error. The prepare-agent-runtime.sh script stages the local node binary into Desktop/Sources/Resources/node, but Homebrew's Node binary is a small stub that dynamically loads libnode.X.dylib at startup via @loader_path. Because only the stub is copied — not the dylib — the binary immediately aborts.

To Reproduce

  1. Install Node via Homebrew (brew install node) — this gives a dynamically-linked build
  2. Clone the repo and cd desktop
  3. Run ./run.sh --yolo (or ./run.sh)
  4. Observe abort during [Preparing agent runtime...]

Current behavior

[agent-runtime] Staged local Node  from /opt/homebrew/bin/node
dyld[4902]: Library not loaded: @rpath/libnode.147.dylib
  Referenced from: .../Desktop/Sources/Resources/node
  Reason: tried: '.../Resources/libnode.147.dylib' (no such file),
          '.../Resources/../lib/libnode.147.dylib' (no such file)
Abort trap: 6

The script errors: ./scripts/prepare-agent-runtime.sh: line 168: 4902 Abort trap: 6

Expected behavior
run.sh builds and launches the desktop app without error regardless of how Node was installed.

Screenshots
N/A — text output only.

user ID: N/A — developer tooling issue

Desktop (please complete the following information):

  • Device: MacBook (Apple Silicon / arm64)
  • macOS: 15.x (Sequoia)
  • Node version: v26.x (via brew install node)
  • App version: latest main

Additional context
Affects any developer with Node installed via Homebrew (v22+). The official nodejs.org prebuilt tarballs ship a statically-linked binary and are unaffected. The --universal-node mode in prepare-agent-runtime.sh (which downloads the official v22 tarball) also works correctly — this is specific to --local-node mode, which is what run.sh always invokes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions