Description
After running hermes update, the dashboard service (hermes-agent.service on a native systemd install — not Docker) enters a permanent crash-loop. Every restart attempt prints:
✗ Web UI npm install failed
…then exits with status 1, systemd retries every ~17s, dashboard URL returns 502 through the reverse proxy.
Root Cause
hermes/web/node_modules is left in a Frankenstein state after hermes update. Running the dashboard manually reveals two compounding errors from the same root cause:
sh: line 1: tsc: command not found
> web@0.0.0 build
> tsc -b && vite build
vite v7.3.2 building client environment for production...
✓ 1045 modules transformed.
✗ Build failed in 1.05s
error during build:
Could not resolve "./icons/alarm-clock-check.js" from "node_modules/lucide-react/dist/esm/lucide-react.js"
file: /home/cashc/.hermes/hermes-agent/web/node_modules/lucide-react/dist/esm/lucide-react.js
Two distinct symptoms, single cause:
tsc missing from node_modules/.bin/ — the TypeScript devDep is declared but isn't materialised in the bin directory after the in-place update.
lucide-react partial install — the package's package.json advertises an icons module path that doesn't exist on disk in the installed copy.
Both are classic symptoms of npm doing a non-atomic install over an existing node_modules tree where dep versions changed across the update (lucide-react upgrade in particular shifts its icons file layout in newer versions).
Repro
- Native install of Hermes Agent (systemd-managed
hermes-agent.service running hermes dashboard --host 100.x.y.z --port 8585 --insecure --no-open as a non-root user).
- Some prior version where
web/node_modules was healthy.
- Run
hermes update. Update completes successfully ("Update complete!").
systemctl restart hermes-agent → crash-loop.
Workaround
cd ~/.hermes/hermes-agent/web
rm -rf node_modules package-lock.json
npm install
sudo systemctl restart hermes-agent
Service comes up healthy, curl http://<bind-host>:8585/ returns 200.
Suggested Fix
The pattern is the same one documented in #16773 (which covers ui-tui/'s @hermes/ink file-dep). The general fix would apply here too:
hermes update's _update_node_dependencies() (in hermes_cli/main.py) should treat web/node_modules (and any other JS subproject) as ephemeral on version-bump updates — rm -rf node_modules && npm ci rather than in-place npm install. The cost is a slower update; the win is updates that never leave the dashboard in a crash-loop.
- Alternatively: detect package.json hash mismatch vs lock and auto-clean on mismatch.
- Or: if performance of full clean is the concern, run
npm install --no-package-lock and then npm dedupe, but the cleanest answer is rm + npm ci.
Environment
- Native install on Arch-based Linux (CachyOS), Node v20+
- Hermes Agent installed at
~/.hermes/hermes-agent/
- Dashboard managed via custom systemd unit
hermes-agent.service (renamed from hermes-dashboard.service at some point in recent versions)
- Bound to a Tailscale IP, no Docker layer involved
Related
Description
After running
hermes update, the dashboard service (hermes-agent.serviceon a native systemd install — not Docker) enters a permanent crash-loop. Every restart attempt prints:…then exits with status 1, systemd retries every ~17s, dashboard URL returns 502 through the reverse proxy.
Root Cause
hermes/web/node_modulesis left in a Frankenstein state afterhermes update. Running the dashboard manually reveals two compounding errors from the same root cause:Two distinct symptoms, single cause:
tscmissing fromnode_modules/.bin/— the TypeScript devDep is declared but isn't materialised in the bin directory after the in-place update.lucide-reactpartial install — the package'spackage.jsonadvertises an icons module path that doesn't exist on disk in the installed copy.Both are classic symptoms of npm doing a non-atomic install over an existing
node_modulestree where dep versions changed across the update (lucide-react upgrade in particular shifts its icons file layout in newer versions).Repro
hermes-agent.servicerunninghermes dashboard --host 100.x.y.z --port 8585 --insecure --no-openas a non-root user).web/node_moduleswas healthy.hermes update. Update completes successfully ("Update complete!").systemctl restart hermes-agent→ crash-loop.Workaround
Service comes up healthy,
curl http://<bind-host>:8585/returns 200.Suggested Fix
The pattern is the same one documented in #16773 (which covers
ui-tui/'s@hermes/inkfile-dep). The general fix would apply here too:hermes update's_update_node_dependencies()(inhermes_cli/main.py) should treatweb/node_modules(and any other JS subproject) as ephemeral on version-bump updates —rm -rf node_modules && npm cirather than in-placenpm install. The cost is a slower update; the win is updates that never leave the dashboard in a crash-loop.npm install --no-package-lockand thennpm dedupe, but the cleanest answer isrm + npm ci.Environment
~/.hermes/hermes-agent/hermes-agent.service(renamed fromhermes-dashboard.serviceat some point in recent versions)Related
ui-tui/@hermes/ink. This issue extends the surface toweb/node_modulesand demonstrates the bug is not limited to file-deps.