Skip to content

fix: resolve shell PATH in Electron to fix spawn node ENOENT#7

Merged
Germey merged 1 commit intomainfrom
fix/electron-path-resolution
Mar 24, 2026
Merged

fix: resolve shell PATH in Electron to fix spawn node ENOENT#7
Germey merged 1 commit intomainfrom
fix/electron-path-resolution

Conversation

@acedatacloud-dev
Copy link
Copy Markdown
Member

Adds fixElectronPath() in electron/main.ts that resolves the user's full shell PATH before the Electron app starts. This fixes the 'spawn node ENOENT' error when Claude Agent SDK tries to spawn node.

Electron apps launched from Dock/Finder inherit a minimal PATH
(/usr/bin:/bin:/usr/sbin:/sbin) that doesn't include user-installed
node (nvm, volta, homebrew, fnm, etc.). This causes the Claude Agent
SDK's child_process.spawn('node', ...) to fail with ENOENT.

Add fixElectronPath() that runs the user's login shell to resolve
their full PATH before the app starts. Falls back to probing common
node binary directories if shell resolution fails.
@Germey Germey merged commit 6a83ee7 into main Mar 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants