Skip to content

fix(nix): include apps/shared in tui build source - #67098

Closed
Chronicuser21 wants to merge 1 commit into
NousResearch:mainfrom
Chronicuser21:fix/tui-nix-shared-workspace-dep
Closed

fix(nix): include apps/shared in tui build source#67098
Chronicuser21 wants to merge 1 commit into
NousResearch:mainfrom
Chronicuser21:fix/tui-nix-shared-workspace-dep

Conversation

@Chronicuser21

Copy link
Copy Markdown

Problem

nix run github:NousResearch/hermes-agent#desktop fails:

ERROR: Could not resolve "@hermes/shared/charge-settlement"

The TUI now depends on @hermes/shared (via ui-tui/package.json: "@hermes/shared": "file:../apps/shared"), and topup.ts imports @hermes/shared/charge-settlement. However, the Nix build for hermes-tui (nix/tui.nix) only included ui-tui/ in its filtered source tree — the apps/shared/ source was missing from the build sandbox. npm install symlinked node_modules/@hermes/shared to a directory that didn't exist in the sandbox, so esbuild couldn't resolve the import.

Fix

Add "apps/shared" to the dirs list in nix/tui.nix so the shared package source is available during the esbuild bundle step.

This follows the exact same pattern already used by nix/web.nix and nix/desktop.nix — both include apps/shared with the comment @hermes/shared ships as a file: workspace dep of ... so its source must be in the filtered src tree too.

The TUI now depends on @hermes/shared (file:../apps/shared), which
exports @hermes/shared/charge-settlement (used by topup.ts). The Nix
build's filtered source tree only included ui-tui/, so apps/shared/src/
was missing in the build sandbox. The symlink from npm install pointed
nowhere, and esbuild couldn't resolve the module.

Following the same pattern used by web.nix and desktop.nix, which both
include apps/shared in their dirs with this exact rationale.
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) area/nix Nix flake, NixOS module, container packaging P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of open #67082: both repairs add apps/shared to the Nix TUI source filter for the same workspace-resolution failure.

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

Labels

area/nix Nix flake, NixOS module, container packaging comp/tui Terminal UI (ui-tui/ + tui_gateway/) duplicate This issue or pull request already exists 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