Skip to content

fix: include dev deps when building web ui#22187

Open
ch79lab wants to merge 1 commit into
NousResearch:mainfrom
ch79lab:fix/webui-build-include-dev
Open

fix: include dev deps when building web ui#22187
ch79lab wants to merge 1 commit into
NousResearch:mainfrom
ch79lab:fix/webui-build-include-dev

Conversation

@ch79lab

@ch79lab ch79lab commented May 9, 2026

Copy link
Copy Markdown

Bug Description

hermes update could fail to rebuild the WebUI when the parent environment exported NODE_ENV=production.

In that scenario, npm omitted devDependencies, so the frontend build failed with tsc: command not found and the update finished with the WebUI unavailable.

Root Cause

The WebUI build path used deterministic npm install logic without explicitly including dev dependencies.

That was unsafe because the frontend build depends on tooling from devDependencies (notably TypeScript/Vite), while NODE_ENV=production causes npm to omit them by default.

Fix

  • add an include_dev flag to _run_npm_install_deterministic()
  • force npm ci --include=dev / npm install --include=dev for the WebUI build path
  • add regression coverage for both install paths and the WebUI build invocation

How to Verify

  1. Export NODE_ENV=production
  2. Run the WebUI build flow
  3. Confirm the build succeeds instead of failing with tsc: command not found

Test Plan

  • Added regression test for this bug
  • Existing focused tests pass
  • Manual verification of the fix

Validation performed:

  • NODE_ENV=production npm run build passed after the fix
  • python -m pytest tests/hermes_cli/test_web_ui_build.py -q -o addopts=''13 passed

Risk Assessment

Low — the change only affects the frontend build dependency install path and makes the WebUI build explicit and deterministic under production-like environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants