From ff449d9f807bc2aa9b6d13aaa8602c37a6a72352 Mon Sep 17 00:00:00 2001 From: PhysicistLeon Date: Sun, 11 Oct 2026 19:36:56 +0300 Subject: fix(daemon): resolve tsx from the filesystem when Node's resolver cannot see node_modules (#28) Inside a Bun-compiled pi binary (pi.exe), createRequire().resolve("tsx/cli") is rooted at the embedded virtual filesystem and cannot see the extension's real node_modules, so browser_setup failed instantly. The resolver result is now checked on disk and, when it fails, the tsx CLI is found by walking up the node_modules chain. Under Bun the daemon runs on `node` from PATH (process.execPath is the pi binary itself); PI_BROWSER_NODE overrides it. Fixes #27 Co-Authored-By: Claude Fable 5.1 --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 60d7d7f..fb7d072 100644 --- a/README.md +++ b/README.md @@ -322,6 +322,7 @@ re-runnable. | `BH_DEBUG_CLICKS` | Same as `--browser-debug-clicks`. | | `BU_CDP_PORTS` | Extra ports to probe during CDP discovery, beyond 9222. | | `BH_SCRIPT_DIR` | Additional directory `browser_run_script` will accept paths from. | +| `PI_BROWSER_NODE` | Node executable used to run the daemon. Defaults to the one running pi, or `node` from `PATH` when pi is a Bun-compiled binary. | --- -- cgit v1.2.3