What happened?
Running bun run dev (which calls electron-vite dev) inside a git worktree (.claude/worktrees/<name>) never launches Electron. predev (icons, remote-bridge, embedded server) and all three electron-vite build phases (main / preload / renderer) finish successfully, but the final "start Electron" step fails.
The root cause is that the Electron binary in the worktree is a stub: node_modules/.bun/electron@40.8.0/node_modules/electron/dist is only 244K (just Contents/MacOS/ + Contents/Resources/), whereas the same version in the main checkout is a complete 274M (includes Contents/Frameworks/Electron Framework.framework and friends). In other words, bun install inside the worktree did not run Electron's binary-download postinstall, leaving an empty shell.
Depending on how incomplete the install is, this surfaces as a few different errors (same underlying cause):
- Missing
path.txt → electron-vite's getElectronPath throws Error: Electron uninstall.
- Missing
Contents/Frameworks/ → the process starts but dyld fails: Library not loaded: @rpath/Electron Framework.framework/Electron Framework.
- (Intermittent, separate) build phase crashes in esbuild:
fatal error: all goroutines are asleep - deadlock! — a retry gets past it; likely related to the large (~19.5MB) embedded-server chunk, not the main cause.
Which area seems affected?
Platform shell, packaging, updater, signing, paths, or permissions
How much does this affect you?
Blocks me from using PawWork (cannot run dev in a worktree at all without a manual fix)
Steps to reproduce
- Create a git worktree (e.g.
git worktree add .claude/worktrees/foo).
- Inside the worktree, run
bun install.
- Run
bun run dev (= electron-vite dev).
- All three build phases succeed, then Electron fails to launch:
Error: Electron uninstall, or dyld: Library not loaded: @rpath/Electron Framework.framework.
What did you expect to happen?
bun run dev inside a worktree should launch the Electron window just like it does in the main checkout. The worktree install should produce a complete Electron binary (Frameworks + path.txt), or reuse/share the already-downloaded dist from the main checkout.
PawWork version
Branch claude/i1188-remote (based on codex/i1188-remote-gateway); electron 40.8.0, electron-vite 5.0.0, bun 1.3.14
OS version
macOS 26.5 (arm64 / Apple Silicon)
Can you reproduce it again?
Yes, every time (every new worktree)
Diagnostics
Evidence:
# worktree (stub)
$ du -sh node_modules/.bun/electron@40.8.0/node_modules/electron/dist
244K .../electron/dist
$ ls .../electron/dist/Electron.app/Contents/
MacOS Resources # no Frameworks/, no path.txt
# main checkout (complete)
$ du -sh /Users/yuhan/workspace/dev/pawwork/node_modules/.bun/electron@40.8.0/node_modules/electron/dist
274M .../electron/dist
$ ls .../electron/dist/Electron.app/Contents/Frameworks/
Electron Framework.framework Electron Helper.app Mantle.framework Squirrel.framework ...
Key log lines (/tmp/electron-dev.log):
# First run: missing path.txt
error during start dev server and electron app:
Error: Electron uninstall
at getElectronPath (.../electron-vite/dist/chunks/lib-q6ns0vZr.js:155:19)
# After adding path.txt: missing Frameworks
starting electron app...
dyld[71941]: Library not loaded: @rpath/Electron Framework.framework/Electron Framework
Referenced from: .../electron/dist/Electron.app/Contents/MacOS/Electron
Reason: tried: '.../Contents/Frameworks/Electron Framework.framework/Electron Framework' (no such file)
# Separate intermittent crash (build phase, passes on retry):
fatal error: all goroutines are asleep - deadlock! # esbuild
Possible directions / temporary workarounds (to be confirmed):
- The worktree
bun install does not trigger Electron's binary-download postinstall (electron is listed in trustedDependencies, but the worktree install seems to skip it).
- Workaround:
export ELECTRON_OVERRIDE_DIST_PATH=<main>/node_modules/.bun/electron@40.8.0/node_modules/electron/dist; or copy/symlink the complete dist from the main checkout into the worktree; or re-run Electron's install.js inside the worktree.
- Longer-term: make worktree installs reliably reuse the already-downloaded Electron binary from the main checkout (shared cache / symlinked
dist), instead of each worktree re-downloading 274M and possibly failing to complete.
What happened?
Running
bun run dev(which callselectron-vite dev) inside a git worktree (.claude/worktrees/<name>) never launches Electron.predev(icons, remote-bridge, embedded server) and all three electron-vite build phases (main / preload / renderer) finish successfully, but the final "start Electron" step fails.The root cause is that the Electron binary in the worktree is a stub:
node_modules/.bun/electron@40.8.0/node_modules/electron/distis only 244K (justContents/MacOS/+Contents/Resources/), whereas the same version in the main checkout is a complete 274M (includesContents/Frameworks/Electron Framework.frameworkand friends). In other words,bun installinside the worktree did not run Electron's binary-download postinstall, leaving an empty shell.Depending on how incomplete the install is, this surfaces as a few different errors (same underlying cause):
path.txt→ electron-vite'sgetElectronPaththrowsError: Electron uninstall.Contents/Frameworks/→ the process starts but dyld fails:Library not loaded: @rpath/Electron Framework.framework/Electron Framework.fatal error: all goroutines are asleep - deadlock!— a retry gets past it; likely related to the large (~19.5MB) embedded-server chunk, not the main cause.Which area seems affected?
Platform shell, packaging, updater, signing, paths, or permissions
How much does this affect you?
Blocks me from using PawWork (cannot run
devin a worktree at all without a manual fix)Steps to reproduce
git worktree add .claude/worktrees/foo).bun install.bun run dev(=electron-vite dev).Error: Electron uninstall, ordyld: Library not loaded: @rpath/Electron Framework.framework.What did you expect to happen?
bun run devinside a worktree should launch the Electron window just like it does in the main checkout. The worktree install should produce a complete Electron binary (Frameworks +path.txt), or reuse/share the already-downloadeddistfrom the main checkout.PawWork version
Branch
claude/i1188-remote(based oncodex/i1188-remote-gateway); electron 40.8.0, electron-vite 5.0.0, bun 1.3.14OS version
macOS 26.5 (arm64 / Apple Silicon)
Can you reproduce it again?
Yes, every time (every new worktree)
Diagnostics
Evidence:
Key log lines (
/tmp/electron-dev.log):Possible directions / temporary workarounds (to be confirmed):
bun installdoes not trigger Electron's binary-download postinstall (electronis listed intrustedDependencies, but the worktree install seems to skip it).export ELECTRON_OVERRIDE_DIST_PATH=<main>/node_modules/.bun/electron@40.8.0/node_modules/electron/dist; or copy/symlink the completedistfrom the main checkout into the worktree; or re-run Electron'sinstall.jsinside the worktree.dist), instead of each worktree re-downloading 274M and possibly failing to complete.