resolveNodeBin
resolveNodeBin(
opts?):string
Defined in: src/node-bin.ts:26
Resolve a node binary for spawning the PTY attach helper (pty-attach.mjs).
The server itself runs under Bun, but the helper needs Node (node-pty is a native Node addon). When Shepherd runs under systemd or another launcher whose PATH excludes a version-manager-managed node (mise/nvm/fnm), spawning bare “node” fails — and every session pane silently stays black. Resolution order:
- explicit override (SHEPHERD_NODE_BIN)
- node on PATH
- known install locations (mise shims, common bin dirs)
- bare “node” as a last resort, so the spawn error is at least legible
Parameters
Section titled “Parameters”ResolveNodeOpts = {}
Returns
Section titled “Returns”string