-
-
Notifications
You must be signed in to change notification settings - Fork 67.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The macOS app (v2.0.0-beta4) fails to start the gateway because the bundled clawdis binary contains hardcoded absolute paths from the build environment that do not exist on end-user machines.
Steps to Reproduce
- Download and install Clawdis.app (v2.0.0-beta4)
- Launch the app
- Observe "Health check failed: Cannot reach gateway at localhost:18789"
- Check Settings → General → shows "Last failure: launchd start timeout"
Expected Behavior
The gateway should start automatically when running in "Local (this Mac)" mode.
Actual Behavior
Gateway crashes immediately on startup with:
ENOENT: no such file or directory, open '/Users/steipete/Projects/clawdis/node_modules/@mariozechner/pi-coding-agent/dist/package.json'
Log Output
From /tmp/clawdis/clawdis-gateway.log:
Bun v1.3.5 (macOS arm64)
79024 | __filename2 = import_url.fileURLToPath("file:///Users/steipete/Projects/clawdis/node_modules/@mariozechner/pi-coding-agent/dist/config.js");
79025 | __dirname2 = import_path40.dirname(__filename2);
79026 | pkg = JSON.parse(import_fs2.readFileSync(getPackageJsonPath(), "utf-8"));
^
ENOENT: no such file or directory, open '/Users/steipete/Projects/clawdis/node_modules/@mariozechner/pi-coding-agent/dist/package.json'
path: "/Users/steipete/Projects/clawdis/node_modules/@mariozechner/pi-coding-agent/dist/package.json",
syscall: "open",
errno: -2,
code: "ENOENT"
Environment
- Clawdis Version: 2.0.0-beta4
- CLI Location: /opt/homebrew/bin/clawdis
- macOS: arm64
- Bun: v1.3.5
Root Cause
The Bun-compiled binary has __filename / __dirname paths baked in from the build machine (/Users/steipete/Projects/clawdis/...). The @mariozechner/pi-coding-agent package uses these paths to locate its package.json at runtime.
Possible Fixes
- Ensure
pi-coding-agent'sgetPackageJsonPath()does not rely on__dirnamein bundled builds - Inline the required package.json data at build time
- Use Bun's
--compilewith proper asset embedding
Workaround
None practical for end users - requires either:
- Building from source
- Creating fake paths on disk (not recommended)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.