jdx/mise · error
package type `cargo` is not supported in the aqua backend…
Error message
package type `cargo` is not supported in the aqua backend. Use the cargo backend instead{}. What it means
Aqua registry entries can declare `type: cargo` (packages to install via crates.io). The aqua backend only fetches prebuilt GitHub/release assets, so cargo-typed packages are rejected and the user is directed to mise's dedicated cargo backend. When the registry entry names a crate (via crate_name or the package name), it appends the exact `cargo:<crate>` backend string to use.
Solutions
- Use the suggested backend from the message: `mise use cargo:<crate-name>`
- Update mise.toml to replace `aqua:<name>` with `cargo:<crate>`
- If you need the prebuilt binary instead, install the tool via the github backend for its releases
Example fix
// before (mise.toml)
[tools]
"aqua:ripgrep" = "latest"
// after
[tools]
ripgrep = { version = "latest", backend = "cargo:ripgrep" }
// or simply: "cargo:ripgrep" = "latest" Defensive patterns
Strategy: fallback
Validate before calling
// resolve the aqua registry entry type before adding to mise.toml
const entry = await registry.lookup(name);
if (entry.type === 'cargo') console.warn(`Use the cargo backend instead: mise use cargo:${entry.crate_name ?? name}`); Try / catch
catch (e) {
if (e.message.includes('Use the cargo backend instead')) {
const crate = e.message.match(/cargo:([^\"]+)/)?.[1];
console.error(`Rewrite to ${crate ? `cargo:${crate}` : 'the cargo backend'}.`);
}
} Prevention
- Prefer mise's native backend shorthands (cargo:, go:, npm:) over aqua for non-release-asset tools
- Check the aqua registry entry's `type` field when migrating configs from aqua to mise
- Ensure Rust toolchain availability when using cargo: backends
When it happens
Trigger: Installing `aqua:<pkg>` where the aqua registry entry's package type is `cargo` — typically when a mise.toml references an aqua shorthand for a Rust CLI.
Common situations: Copying tool configs that used aqua for a Rust tool; the aqua registry migrating entries from github-release to cargo type; users assuming aqua covers all registry-listed tools.
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
- package type ` ` is not supported in the aqua backend. Use…
- aqua package does not have repo_owner and/or repo_name.
- aqua var ` ` must be a string, got
- at least one bin path should exist
- cargo-binstall cannot honor cargo install-only tool…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/1bc454ef8e905984.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/aqua.rs:5140
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 533346cc37)