jdx/mise · error

package type `cargo` is not supported in the aqua backend. U

Error message

package type `cargo` is not supported in the aqua backend. Use the cargo backend instead{}.

What it means

Rust crates in the aqua registry are declared with package type `cargo`, but mise's aqua backend does not build or fetch cargo packages. validate() rejects them and directs users to mise's dedicated cargo backend, appending the crate name when it can derive it from crate_name or the package name.

Source

Thrown at src/backend/aqua.rs:5015

fn validate(pkg: &AquaPackage, version: &str) -> Result<()> {
    if pkg.no_asset.unwrap_or(false) {
        bail!("no asset released");
    }
    if let Some(message) = &pkg.error_message {
        bail!("{}", message);
    }
    if !is_platform_supported(&pkg.supported_envs, os(), arch()) {
        bail!(
            "unsupported env: {}/{} (supported: {:?})",
            os(),
            arch(),
            pkg.supported_envs
        );
    }
    match pkg.package_type() {
        AquaPackageType::Cargo => {
            bail!(
                "package type `cargo` is not supported in the aqua backend. Use the cargo backend instead{}.",
                pkg.crate_name
                    .as_deref()
                    .filter(|name| !name.is_empty())
                    .or_else(|| {
                        pkg.name
                            .as_deref()
                            .and_then(|s| s.strip_prefix("crates.io/"))
                    })
                    .map(|name| format!(": cargo:{}", name.escape_debug()))
                    .unwrap_or_default()
            )
        }
        AquaPackageType::GoInstall => {
            let backend = go_install_backend(pkg, version)?;
            bail!(
                "package type `go_install` is not supported in the aqua backend. Use the go backend instead: {backend}."
            )

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Use the cargo backend instead: `mise use cargo:<crate-name>` with the crate name from the error message
  2. Ensure a Rust toolchain is available (mise can install rust/cargo) since the cargo backend builds from source
  3. Alternatively check if the project also publishes prebuilt GitHub releases and use `github:owner/repo`
  4. Update mise in case a non-cargo distribution was added for this tool

Example fix

// before
[tools]
aqua:owner/some-rust-cli = "latest"

// after
[tools]
cargo:some-rust-cli = "latest"
Defensive patterns

Strategy: fallback

Validate before calling

// detect cargo-type aqua packages before adding them
const pkg = await fetchAquaRegistryEntry(pkgName);
if (pkg.package_type === "cargo") {
  const crate = pkg.crate_name || pkg.name;
  console.warn(`Use the cargo backend instead: mise use cargo:${crate}`);
}

Try / catch

try {
  await $`mise use aqua:owner/repo`;
} catch (e) {
  const m = String(e).match(/Use the cargo backend instead(.*?)\./);
  if (m) {
    const crate = m[1].trim() || pkgName;
    await $`mise use cargo:${crate}`;
  } else throw e;
}

Prevention

When it happens

Trigger: Installing an aqua-registered tool whose AquaPackage.package_type() is AquaPackageType::Cargo (src/backend/aqua.rs:5015), e.g. `aqua:owner/some-rust-cli` in mise.toml where the aqua entry wraps a crates.io crate.

Common situations: Following aqua-registry documentation that lists a Rust CLI while using mise; copying an aqua-based install command into mise.toml for a Rust tool; registry entries for crates migrated into mise's cargo shorthand.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/1bc454ef8e905984. Report an issue: GitHub.