astrid-runtime/astrid · error

astrid-build produced no .capsule archive.

Error message

astrid-build produced no .capsule archive.

What it means

After `astrid-build` exits successfully, `clone_and_build` scans the build output directory for a produced `.capsule` archive; if none is found it bails with this message. This is a post-build sanity check: the build claimed success but emitted no installable capsule artifact, so installation cannot continue.

Source

Thrown at crates/astrid-cli/src/commands/capsule/install.rs:644

                        .context("invalid built archive path")?,
                    context.principal,
                    context.prompt,
                )?,
            )
            .await;
        }
        return unpack_via_lib(
            &produced[idx],
            context.workspace,
            context.home,
            context.original_source,
            context.principal,
            context.expected,
            context.prompt,
        );
    }

    bail!("astrid-build produced no .capsule archive.");
}

async fn install_from_local(
    source: &str,
    workspace: bool,
    home: &AstridHome,
    original_source: Option<&str>,
    principal: &astrid_core::PrincipalId,
    expected: Option<ExpectedCapsule<'_>>,
    prompt: &ManualInstallOptions,
) -> anyhow::Result<Vec<InstalledCapsuleOutcome>> {
    let source_path = Path::new(source);
    if !source_path.exists() {
        bail!("Source path does not exist: {source}");
    }

    // Unpack `.capsule` archive when source is a file.
    if source_path.is_file() && source.ends_with(".capsule") {

View on GitHub (pinned to affd8760f4)

Solutions

  1. Verify the repo is actually an installable capsule (contains the capsule manifest/astrid-build config); if not, install from a different source
  2. Run `astrid-build` manually on the cloned repo and inspect the output directory to see what it produced and where
  3. Fix or update the capsule's build configuration so the `.capsule` archive is emitted into the expected output directory
  4. Update `astrid-build` to a current version and retry, in case an outdated builder silently skipped packaging

Example fix

// before: repo has no capsule manifest, build no-ops
astrid capsule install github:org/not-a-capsule
// error: astrid-build produced no .capsule archive.
// after: use a repo that actually ships capsule build config
astrid capsule install github:org/real-capsule
Defensive patterns

Strategy: validation

Validate before calling

// Confirm the repo is a capsule (has build config) before source install
let has_manifest = std::path::Path::new("capsule.toml").exists()
    || std::path::Path::new("Capsule.toml").exists();
if !has_manifest {
    eprintln!("repo has no capsule manifest; astrid-build will emit no .capsule archive");
}

Try / catch

match clone_and_build(url, ...) {
    Ok(id) => proceed(id),
    Err(e) if e.to_string().contains("produced no .capsule archive") => {
        // repo likely isn't a capsule or build output path is misconfigured;
        // switch to a release-asset install or fix the build config
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Installing a capsule from GitHub source where `astrid-build` returns exit code 0 but writes no `*.capsule` file into the `--output` directory — e.g. the repo is not actually a capsule (no capsule manifest), the build succeeds as a no-op, or the build writes its artifact to an unexpected location.

Common situations: Pointing the installer at a plain library/app repo that has no capsule build configuration; a capsule manifest misconfigured with a wrong output path; a version mismatch where an older `astrid-build` silently skips packaging; repo layout changed upstream and the build output no longer lands in `dist`.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/4f0b7d751b481c9b. Report an issue: GitHub.