jdx/mise · error

provider ' ' does not support adding packages

Error message

provider '{}' does not support adding packages

What it means

`DepsProvider` trait's default `add_command` implementation is a guard: providers that don't implement package installation hit this `bail!`. It means you invoked `mise deps add` against a provider that only supports listing/resolution, not mutation of dependencies.

Solutions

  1. Switch to a provider that supports adding packages (one that overrides `add_command`)
  2. Add/edit the dependency directly with the underlying package manager (e.g. `cargo add`, `npm install`) and let mise re-read the manifest
  3. Implement `add_command` if this is your own provider

Example fix

// before
provider = "custom-readonly"
mise deps add serde
// after
provider = "cargo"
mise deps add serde
Defensive patterns

Strategy: fallback

Try / catch

match provider.add_command(pkgs, dev) {
    Ok(cmd) => run(cmd),
    Err(_) => fallback_to_native_pm(provider.id(), pkgs), // e.g. `cargo add`
}

Prevention

When it happens

Trigger: Running a deps-add operation whose selected provider has not overridden `add_command`, so the default trait method bails with the provider id.

Common situations: Using `mise deps add` with a custom/legacy provider or one backed by a read-only source; assuming every provider supports adding packages like npm/cargo do.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/7cbe56faf2aa4962. Report an issue: GitHub.

Appendix: source

Thrown at src/deps/mod.rs:282

        self.base().config.depends.clone()
    }

    /// Timeout duration for this provider's run command
    fn timeout(&self) -> Option<std::time::Duration> {
        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(crate) 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;
    }

View on GitHub (pinned to 533346cc37)