HKUDS/nanobot · error · TuiUnavailableError
could not install TUI dependencies
Error message
could not install TUI dependencies: {exc} What it means
In _resolve_source_tui_command, running `bun install --frozen-lockfile` in the TUI source directory raised OSError (bun could not be executed, cwd missing, etc.). The launcher wraps it in TuiUnavailableError with the OS detail because the TUI cannot run without its locked node_modules dependencies.
Solutions
- Re-run `nanobot agent` once the transient OS issue (permissions, missing directory) is fixed
- Verify bun is executable and the tui/ directory is intact
- Use `nanobot agent --classic` to bypass the native TUI
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at nanobot/cli/tui_launcher.py:228 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/9624df6130521d32.
Report an issue: GitHub.
Appendix: source
Thrown at nanobot/cli/tui_launcher.py:228
project_root = project_root.resolve(strict=False)
source_dir = project_root / "tui"
if (project_root / "pyproject.toml").is_file() and (source_dir / "package.json").is_file():
return source_dir
return None
def _resolve_source_tui_command(source_dir: Path, bun: str) -> list[str]:
dependency = source_dir / "node_modules" / "@opentui" / "core"
try:
install = subprocess.run(
[bun, "install", "--frozen-lockfile"],
cwd=source_dir,
capture_output=True,
text=True,
check=False,
)
except OSError as exc:
raise TuiUnavailableError(f"could not install TUI dependencies: {exc}") from exc
if install.returncode != 0 or not dependency.is_dir():
detail = (install.stderr or install.stdout).strip().splitlines()
suffix = f": {detail[-1]}" if detail else ""
raise TuiUnavailableError(f"could not install TUI dependencies{suffix}")
executable = named_executable(
bun,
name="nanobot-tui",
directory=get_data_dir() / "run" / "executables",
)
return [executable, str(source_dir / "src" / "index.ts")]
def _download_release_tui(asset: str) -> Path | None:
"""Install the complete, version-matched TUI release bundle."""
if os.environ.get("NANOBOT_TUI_NO_DOWNLOAD") == "1":
return None
version = __version__.strip()
if not version or version.endswith((".dev0", "+dev")):View on GitHub (pinned to 42f37dc4c0)