Repository navigation
Description
Problem
I want to use herdr web ui alongside existing nvm-managed projects without changing their Node runtime.
On my Ubuntu 20.04.5 x64 host, the installation had this symlink:
~/.local/bin/node -> ~/.local/share/herdr-web-ui/node/bin/node
The app-managed Node was v22.23.2. Because my shell puts ~/.local/bin before the nvm directory, node resolved to v22.23.2 while npm came from the project's Node v14.17.1 installation. This caused an existing node-sass project to fail during npm install.
Removing the symlink restored the project's Node selection, but exposed another problem: the unpatched Web UI used the Node from the existing Herdr process's PATH, which was v10.24.1. Its PTY sidecar repeatedly exited with "SyntaxError: Unexpected token *". Conversation output kept updating, but the input connection repeatedly closed.
During a manual upgrade to 0.4.0, bun run typecheck also picked Node 10 and failed with "SyntaxError: Unexpected token ?".
The original PTY issue was observed on 0.3.51. I am now running 0.4.0 with a local patch that explicitly selects the app-managed Node for the PTY sidecar. Herdr is 0.9.3 and Bun is 1.4.0.
Related issues:
-
CI: nothing fails when a remote PC without Node mirrors instead of attaching, or when the Windows-only paths break #271: Its closing comment explicitly notes that a Node older than 18 appearing first on PATH remains outside the covered fixes
-
bun run check: what a local run still does not cover #554: Tracks differences between the Node version used in CI and the Node selected from PATH on a local PC
Proposal
Please keep the app's Node runtime isolated from the user's development environment:
-
Stop creating ~/.local/bin/node when installing the app-managed Node. Keep that runtime in the app's own directory.
-
Resolve the Node executable using:
- An optional explicit override, for example HERDR_WEB_NODE_BIN.
- The runtime provided by the active remote bundle or app installation.
- A compatible Node from PATH as a fallback.
-
Use the same resolved executable for both the sidecar availability check and the actual PTY spawn. Validate that it is Node, not Bun, and meets the project's supported version requirements. An invalid explicit override should produce a clear diagnostic.
-
Make automatic selection work without any configuration. The override should be optional and supported through the existing plugin env/.env files, without requiring users to edit .bashrc or .zshrc before installation.
-
Apply the selected Node to app installation/update build subprocesses as well, so tools such as tsc and Vite do not accidentally use an older Node. Keep this environment change scoped to those subprocesses.
Where
Install and updates
Workarounds and alternatives
My current workaround is to:
- Remove only the symlink pointing to the app-managed Node.
- Patch server/pty/session.ts to launch ~/.local/share/herdr-web-ui/node/bin/node explicitly.
- Prepend that Node directory to PATH only for the app's typecheck/build process.
This restored the Web UI and the project's Node selection, but the local source patch blocks the built-in updater and must be maintained across releases.
Hard-coding this path upstream would not cover source installations or remote bundles with different runtime locations. Automatic selection with an optional explicit override would avoid requiring a local patch.
Activity
fix(install): keep the installer's Node off the user's PATH, and run …