NousResearch/hermes-agent · error · anyhow::Error

Rebuilding the desktop app failed (exit {:?}). The update wa

Error message

Rebuilding the desktop app failed (exit {:?}). The update was applied but the app could not be rebuilt; run `hermes desktop` from a terminal to see the error.

What it means

Stage-3 failure of the update flow: `hermes desktop --build-only` (the rebuild that `hermes update` deliberately skips) exited non-zero. The state is deliberately partial — the update itself was applied, but the desktop app binary could not be rebuilt, so the user is pointed at running `hermes desktop` from a terminal to see the real build error.

Source

Thrown at apps/bootstrap-installer/src-tauri/src/update.rs:548

             applied but the app could not be rebuilt; run `hermes desktop` \
             from a terminal to see the error.",
            rebuild.exit_code
        );
        emit_stage(
            &app,
            "rebuild",
            StageState::Failed,
            Some(rebuild_ms),
            Some(msg.clone()),
        );
        emit(
            &app,
            BootstrapEvent::Failed {
                stage: Some("rebuild".into()),
                error: msg.clone(),
            },
        );
        return Err(anyhow!(msg));
    }
    emit_stage(&app, "rebuild", StageState::Succeeded, Some(rebuild_ms), None);

    let launch_target = if let Some(target_app) = target_app {
        let started = Instant::now();
        emit_stage(&app, "install", StageState::Running, None, None);
        match install_macos_app_update(&app, &install_root, &target_app).await {
            Ok(installed_app) => {
                emit_stage(
                    &app,
                    "install",
                    StageState::Succeeded,
                    Some(started.elapsed().as_millis() as u64),
                    None,
                );
                Some(installed_app)
            }
            Err(err) => {

View on GitHub (pinned to c896c09c42)

Solutions

  1. Run `hermes desktop` from a terminal and read the first actual error in the build output.
  2. If it is a dependency/toolchain issue: update Xcode CLT / MSVC / Node, then retry the rebuild.
  3. Clean the build state (remove apps/desktop node_modules / release dir) and rebuild.
  4. Free disk space and memory; electron builds need several GB.
Defensive patterns

Strategy: fallback

Validate before calling

// Before the rebuild step, check the toolchain is present.
fn desktop_build_prereqs_ok() -> bool {
    ["node", "npm"].iter().all(|tool| {
        std::process::Command::new(tool).arg("--version").output().is_ok_and(|o| o.status.success())
    })
}

if !desktop_build_prereqs_ok() {
    eprintln!("node/npm missing — the desktop rebuild will fail. Install Node first.");
}

Try / catch

// The update itself succeeded — degrade gracefully, tell the user exactly what to do next.
if rebuild.exit_code != Some(0) {
    emit_stage(&app, "rebuild", StageState::Failed, Some(ms),
        Some("Update applied but the desktop app could not be rebuilt; run `hermes desktop` from a terminal to see the error.".into()));
    // Do NOT roll back the applied update; offer manual rebuild instead.
}

Prevention

When it happens

Trigger: Node/npm toolchain failures during the Electron/React build (missing node_modules, npm registry errors, out-of-memory), Rust/Tauri build failures, disk-full during bundling, or native module compilation errors after an OS/Xcode/MSVC toolchain update.

Common situations: Upgraded macOS without updating Xcode CLT so node-gyp fails; npm proxy blocking registry.npmjs.org; a dev machine low on RAM where esbuild/electron-builder OOM; node_modules in a half-installed state from an interrupted earlier build.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/70984ed228f09303. Report an issue: GitHub.