fix: include dev deps when building web ui#22187
Open
ch79lab wants to merge 1 commit into
Open
Conversation
This was referenced May 14, 2026
hermes update fails web UI build when NODE_ENV=production — npm install omits devDependencies
#27430
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Description
hermes updatecould fail to rebuild the WebUI when the parent environment exportedNODE_ENV=production.In that scenario, npm omitted
devDependencies, so the frontend build failed withtsc: command not foundand 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), whileNODE_ENV=productioncauses npm to omit them by default.Fix
include_devflag to_run_npm_install_deterministic()npm ci --include=dev/npm install --include=devfor the WebUI build pathHow to Verify
NODE_ENV=productiontsc: command not foundTest Plan
Validation performed:
NODE_ENV=production npm run buildpassed after the fixpython -m pytest tests/hermes_cli/test_web_ui_build.py -q -o addopts=''→13 passedRisk Assessment
Low — the change only affects the frontend build dependency install path and makes the WebUI build explicit and deterministic under production-like environments.