HKUDS/nanobot · error · TuiUnavailableError
could not install TUI dependencies
Error message
could not install TUI dependencies{suffix} What it means
In _resolve_source_tui_command, `bun install --frozen-lockfile` finished but failed: non-zero exit code, or @opentui/core is missing from node_modules. The last line of bun's stderr/stdout is appended as the detail suffix; the fault is in the TUI checkout's dependency state (lockfile mismatch, registry unreachable, corrupt install).
Solutions
- Read the appended bun error line for the root cause
- Delete tui/node_modules and retry so bun reinstalls from the lockfile
- Check network access to the package registry, or use `nanobot agent --classic`
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at nanobot/cli/tui_launcher.py:232 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/8d00aa20675dc066.
Report an issue: GitHub.
Appendix: source
Thrown at nanobot/cli/tui_launcher.py:232
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")):
return None
target_dir = get_data_dir() / "bin" / "tui" / version
cached = _cached_release_tui(target_dir, asset)View on GitHub (pinned to 42f37dc4c0)