hermes - 💡(How to fix) Fix hermes update fails web UI build when NODE_ENV=production — npm install omits devDependencies

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

When running hermes update in an environment where NODE_ENV=production is set (common on VPS / CI / docker deployments), the web UI build step fails because npm install skips devDependencies.

Fix Action

Fix / Workaround

Workaround (user-side)

Code Example

export NODE_ENV=production
cd /data/hermes/hermes-agent/ui-tui
npm install
npm run build   # fails: esbuild not found

---

NODE_ENV=development npm install --prefix ui-tui
# OR
npm install --include=dev --prefix ui-tui

---

NODE_ENV=development hermes update
RAW_BUFFERClick to expand / collapse

Bug description

When running hermes update in an environment where NODE_ENV=production is set (common on VPS / CI / docker deployments), the web UI build step fails because npm install skips devDependencies.

In ui-tui/package.json, critical build-time packages (typescript, esbuild, @types/node, tsx) are listed under devDependencies. When NODE_ENV=production, npm omits them, leading to errors like:

  • sh: 1: tsc: not found
  • Cannot find package 'esbuild'
  • Cannot find name 'process' (missing @types/node)

The update then falls back to serving stale dist/ from a previous build.

Steps to reproduce

  1. Set NODE_ENV=production in the shell.
  2. Run hermes update (or npm install inside ui-tui/).
  3. Observe the npm install step completes but only dependencies are installed.
  4. Build fails because typescript, esbuild, and @types/node are missing.

Expected behaviour

hermes update should ensure build tooling is available regardless of NODE_ENV. Options:

  • Option A: Run npm install --include=dev during the update step.
  • Option B: Move typescript, esbuild, @types/node from devDependencies to dependencies.
  • Option C: Prefix the npm install step with NODE_ENV=development.

Actual behaviour

Build fails with stale dist fallback.

Environment

  • Hermes: 0.14.0 (git main)
  • Node.js: 22.22.2
  • npm: 10.x
  • OS: Ubuntu 24.04 (Linux 6.8.0)

Minimal reproduction

export NODE_ENV=production
cd /data/hermes/hermes-agent/ui-tui
npm install
npm run build   # fails: esbuild not found

Suggested fix

In the hermes update script:

NODE_ENV=development npm install --prefix ui-tui
# OR
npm install --include=dev --prefix ui-tui

Workaround (user-side)

Until fixed:

NODE_ENV=development hermes update

Impact: Every VPS/production deployment with NODE_ENV=production silently gets stale web UI builds after hermes update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix hermes update fails web UI build when NODE_ENV=production — npm install omits devDependencies