fix(web-ui): force NODE_ENV=development during npm install/build#18682
Open
drewdols-netizen wants to merge 1 commit into
Open
fix(web-ui): force NODE_ENV=development during npm install/build#18682drewdols-netizen wants to merge 1 commit into
drewdols-netizen wants to merge 1 commit into
Conversation
When the user's shell has NODE_ENV=production set (common in containerized or production-oriented environments), > hermes-agent@1.0.0 postinstall > echo '✅ Browser tools ready. Run: python run_agent.py --help' ✅ Browser tools ready. Run: python run_agent.py --help added 204 packages, and audited 205 packages in 10s 38 packages are looking for funding run `npm fund` for details found 0 vulnerabilities silently skips devDependencies. This causes the subsequent to fail with 'tsc: command not found' because TypeScript is a devDependency. Changes: - _run_npm_install_deterministic now accepts an optional HERMES_GATEWAY_SESSION=1 HERMES_TUI_ACTIVE_SESSION_FILE=/var/folders/05/1pwjb5lj7v78vs92q06ch61m0000gn/T/hermes-tui-active-session-_4z9e2z4.json TERMINAL_PERSISTENT_SHELL=True TERMINAL_CONTAINER_CPU=1 TERM_PROGRAM=Apple_Terminal BROWSER_INACTIVITY_TIMEOUT=120 X_ACCESS_TOKEN_SECRET=herems TERM=xterm-256color SHELL=/bin/zsh HERMES_PYTHON=/Users/drewolson/.hermes/hermes-agent/venv/bin/python3 HERMES_MAX_ITERATIONS=90 TERMINAL_LIFETIME_SECONDS=300 TMPDIR=/var/folders/05/1pwjb5lj7v78vs92q06ch61m0000gn/T/ HOMEBREW_REPOSITORY=/opt/homebrew TERM_PROGRAM_VERSION=466 TERMINAL_DOCKER_VOLUMES=[] HERMES_QUIET=1 NODE_OPTIONS=--max-old-space-size=8192 --expose-gc FPATH=/opt/homebrew/share/zsh/site-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.9/functions OLDPWD=/Users/drewolson/.hermes/hermes-agent TERMINAL_ENV=local VISION_TOOLS_DEBUG=false MOA_TOOLS_DEBUG=false TERM_SESSION_ID=887D8927-F1A8-4ACA-A21A-9D4A9CE6DE9C TERMINAL_CONTAINER_PERSISTENT=True USER=drewolson WEB_TOOLS_DEBUG=false HERMES_PYTHON_SRC_ROOT=/Users/drewolson/.hermes/hermes-agent X_ACCESS_TOKEN=stop SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.P0lYXVupxS/Listeners IMAGE_TOOLS_DEBUG=false __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 TERMINAL_SINGULARITY_IMAGE=docker://nikolaik/python-nodejs:python3.11-nodejs20 PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/opt/homebrew/bin:/Users/drewolson/.local/bin:/opt/homebrew/opt/node@22/bin:/opt/homebrew/sbin HERMES_REDACT_SECRETS=true BROWSERBASE_ADVANCED_STEALTH=false __CFBundleIdentifier=com.apple.Terminal TERMINAL_DAYTONA_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20 HERMES_CWD=/Users/drewolson PWD=/Users/drewolson/.hermes/hermes-agent TERMINAL_DOCKER_MOUNT_CWD_TO_WORKSPACE=False LANG=en_US.UTF-8 HERMES_INTERACTIVE=1 XPC_FLAGS=0x0 NODE_ENV=production TERMINAL_TIMEOUT=60 TERMINAL_MODAL_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20 TERMINAL_DOCKER_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20 TERMINAL_CONTAINER_MEMORY=5120 TERMINAL_CWD=/Users/drewolson XPC_SERVICE_NAME=0 HOME=/Users/drewolson SHLVL=3 HOMEBREW_PREFIX=/opt/homebrew PYTHONPATH=/Users/drewolson/.hermes/hermes-agent LOGNAME=drewolson BROWSERBASE_PROXIES=true TERMINAL_DOCKER_FORWARD_ENV=[] BROWSER_SESSION_TIMEOUT=300 HOMEBREW_CELLAR=/opt/homebrew/Cellar INFOPATH=/opt/homebrew/share/info: OSLogRateLimit=64 TERMINAL_CONTAINER_DISK=51200 HERMES_EXEC_ASK=1 X_BEARER_TOKEN=skip COLORTERM=truecolor _=/usr/bin/env param - _build_web_ui creates a build_env with NODE_ENV=development and passes it to both npm install and npm run build Fixes: users no longer see 'Web UI build failed' when NODE_ENV=production
Collaborator
|
Likely duplicate of #17906 — same root cause: NODE_ENV=production leaking into npm install causes devDependencies to be skipped, breaking web UI build. |
1 similar comment
Collaborator
|
Likely duplicate of #17906 — same root cause: NODE_ENV=production leaking into npm install causes devDependencies to be skipped, breaking web UI build. |
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.
Problem
When the user's shell has set,
✅ Browser tools ready. Run: python run_agent.py --help
added 204 packages, and audited 205 packages in 11s
38 packages are looking for funding
run
npm fundfor detailsfound 0 vulnerabilities silently skips . This causes the subsequent to fail with because is listed under in .
Changes
HERMES_TUI_ACTIVE_SESSION_FILE=/var/folders/05/1pwjb5lj7v78vs92q06ch61m0000gn/T/hermes-tui-active-session-_4z9e2z4.json
TERMINAL_PERSISTENT_SHELL=True
TERMINAL_CONTAINER_CPU=1
TERM_PROGRAM=Apple_Terminal
BROWSER_INACTIVITY_TIMEOUT=120
X_ACCESS_TOKEN_SECRET=herems
TERM=xterm-256color
SHELL=/bin/zsh
HERMES_PYTHON=/Users/drewolson/.hermes/hermes-agent/venv/bin/python3
HERMES_MAX_ITERATIONS=90
TERMINAL_LIFETIME_SECONDS=300
TMPDIR=/var/folders/05/1pwjb5lj7v78vs92q06ch61m0000gn/T/
HOMEBREW_REPOSITORY=/opt/homebrew
TERM_PROGRAM_VERSION=466
TERMINAL_DOCKER_VOLUMES=[]
HERMES_QUIET=1
NODE_OPTIONS=--max-old-space-size=8192 --expose-gc
FPATH=/opt/homebrew/share/zsh/site-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.9/functions
OLDPWD=/Users/drewolson/.hermes/hermes-agent
TERMINAL_ENV=local
VISION_TOOLS_DEBUG=false
MOA_TOOLS_DEBUG=false
TERM_SESSION_ID=887D8927-F1A8-4ACA-A21A-9D4A9CE6DE9C
TERMINAL_CONTAINER_PERSISTENT=True
USER=drewolson
WEB_TOOLS_DEBUG=false
HERMES_PYTHON_SRC_ROOT=/Users/drewolson/.hermes/hermes-agent
X_ACCESS_TOKEN=stop
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.P0lYXVupxS/Listeners
IMAGE_TOOLS_DEBUG=false
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
TERMINAL_SINGULARITY_IMAGE=docker://nikolaik/python-nodejs:python3.11-nodejs20
PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/opt/homebrew/bin:/Users/drewolson/.local/bin:/opt/homebrew/opt/node@22/bin:/opt/homebrew/sbin
HERMES_REDACT_SECRETS=true
BROWSERBASE_ADVANCED_STEALTH=false
__CFBundleIdentifier=com.apple.Terminal
TERMINAL_DAYTONA_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20
HERMES_CWD=/Users/drewolson
PWD=/Users/drewolson/.hermes/hermes-agent
TERMINAL_DOCKER_MOUNT_CWD_TO_WORKSPACE=False
LANG=en_US.UTF-8
HERMES_INTERACTIVE=1
XPC_FLAGS=0x0
NODE_ENV=production
TERMINAL_TIMEOUT=60
TERMINAL_MODAL_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20
TERMINAL_DOCKER_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20
TERMINAL_CONTAINER_MEMORY=5120
TERMINAL_CWD=/Users/drewolson
XPC_SERVICE_NAME=0
HOME=/Users/drewolson
SHLVL=3
HOMEBREW_PREFIX=/opt/homebrew
PYTHONPATH=/Users/drewolson/.hermes/hermes-agent
LOGNAME=drewolson
BROWSERBASE_PROXIES=true
TERMINAL_DOCKER_FORWARD_ENV=[]
BROWSER_SESSION_TIMEOUT=300
HOMEBREW_CELLAR=/opt/homebrew/Cellar
INFOPATH=/opt/homebrew/share/info:
OSLogRateLimit=64
TERMINAL_CONTAINER_DISK=51200
HERMES_EXEC_ASK=1
X_BEARER_TOKEN=skip
COLORTERM=truecolor
_=/usr/bin/env parameter and passes it through to
Testing
Closes: users who see during ⚕ Updating Hermes Agent...
→ Fetching updates...
⚠ Currently on branch 'fix/node-env-web-ui-build' — switching to main for update...
✓ Already up to date! when running in production-oriented shell environments.