diff --git a/hermes_cli/main.py b/hermes_cli/main.py index 60f82adf2b..e967a158be 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -1570,7 +1570,9 @@ def _make_tui_argv(tui_dir: Path, tui_dev: bool) -> tuple[list[str], Path]: if not os.environ.get("HERMES_QUIET"): print("Installing TUI dependencies…") npm_cwd = _workspace_root(tui_dir) - npm_workspace_args: tuple[str, ...] = () + # --workspace ui-tui avoids resolving apps/desktop (Electron + node-pty). + # See #38772. + npm_workspace_args: tuple[str, ...] = ("--workspace", "ui-tui") if termux_startup: npm_cwd, npm_workspace_args = _termux_workspace_install_context( tui_dir, @@ -7109,7 +7111,7 @@ def _build_web_ui(web_dir: Path, *, fatal: bool = False) -> bool: ) _relay(r1) if fatal: - _say(" Run manually: cd web && npm install && npm run build") + _say(" Run manually: npm install --workspace web && npm run build -w web") return False # First attempt — stream output via idle-timeout helper (issue #33788). # capture_output=True on a long Vite build looks identical to a hang; @@ -7151,7 +7153,7 @@ def _build_web_ui(web_dir: Path, *, fatal: bool = False) -> bool: ) _relay(r2) if fatal: - _say(" Run manually: cd web && npm install && npm run build") + _say(" Run manually: npm install --workspace web && npm run build -w web") return False _say(" ✓ Web UI built") return True diff --git a/tests/hermes_cli/test_cmd_update.py b/tests/hermes_cli/test_cmd_update.py index d8204524c5..0c629a6668 100644 --- a/tests/hermes_cli/test_cmd_update.py +++ b/tests/hermes_cli/test_cmd_update.py @@ -272,7 +272,7 @@ class TestCmdUpdateBranchFallback: # The web/ install runs from the workspace root when the root # lockfile exists (npm workspaces hoist node_modules upward). assert npm_calls[2:] == [ - (["/usr/bin/npm", "ci", "--silent"], PROJECT_ROOT), + (["/usr/bin/npm", "ci", "--silent", "--workspace", "web"], PROJECT_ROOT), ] # The web UI build itself went through the streaming helper.