jdx/mise · error · eyre::Report

provider '{}' does not support removing packages

Error message

provider '{}' does not support removing packages

What it means

Default implementation of the `DepsProvider::remove_command` trait method (src/deps/mod.rs:282), the mirror of `add_command`. Providers without a remove workflow (only bun/npm/deno/pnpm/dart/aube/yarn override it) inherit this bail. `mise deps remove` (src/cli/deps/remove.rs:63) calls it, so removing through an unsupported provider fails explicitly.

Source

Thrown at src/deps/mod.rs:283

        self.base().config.timeout.as_deref().and_then(|t| {
            match crate::duration::parse_duration(t) {
                Ok(d) => Some(d),
                Err(err) => {
                    warn!("deps: {}: invalid timeout {t:?}: {err}", self.id());
                    None
                }
            }
        })
    }

    /// Command to add one or more package dependencies
    fn add_command(&self, _packages: &[&str], _dev: bool) -> Result<DepsCommand> {
        bail!("provider '{}' does not support adding packages", self.id())
    }

    /// Command to remove one or more package dependencies
    fn remove_command(&self, _packages: &[&str]) -> Result<DepsCommand> {
        bail!(
            "provider '{}' does not support removing packages",
            self.id()
        )
    }
}

/// Warn if any auto-enabled deps providers are stale
pub fn notify_if_stale(config: &Arc<Config>, effective_env: &BTreeMap<String, String>) {
    // Skip in shims or quiet mode
    if *env::__MISE_SHIM || Settings::get().quiet {
        return;
    }

    // Check if this feature is enabled
    if !Settings::get().status.show_deps_stale {
        return;
    }

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Remove the package with the package manager directly (e.g. `cargo remove`, `pip uninstall`) and let mise re-read the manifest
  2. Use a provider that implements remove: bun, npm, pnpm, yarn, deno, dart, or aube
  3. For custom providers, implement `remove_command` alongside `add_command`

Example fix

# before
$ mise deps remove serde --provider cargo
# after
$ cargo remove serde
Defensive patterns

Strategy: validation

Validate before calling

# capability check before mise deps remove
supports_remove() { case "$1" in bun|npm|pnpm|yarn|deno|dart|aube) return 0 ;; *) return 1 ;; esac; }
if supports_remove "$PROVIDER"; then mise deps remove "$PKG" --provider "$PROVIDER"; else echo "$PROVIDER cannot remove — run its package manager directly" >&2; fi

Type guard

fn supports_remove(id: &str) -> bool {
    matches!(id, "bun" | "npm" | "pnpm" | "yarn" | "deno" | "dart" | "aube")
}

Try / catch

Match the remove_command error message; on `does not support removing packages`, shell out to the package manager's own remove command and continue, so cleanup scripts do not abort halfway.

Prevention

When it happens

Trigger: `mise deps remove <pkg> --provider <id>` where `<id>` did not override `remove_command` — same class of provider as for add: manifest-tracking providers with no driven remove workflow.

Common situations: Cleanup scripts running `mise deps remove` across all enabled providers; trying to remove a cargo/pip dependency through mise; custom providers implementing add but not remove.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/85fe8559b4c5a899. Report an issue: GitHub.