jdx/mise · error

local plugin directory does not exist: {}

Error message

local plugin directory does not exist: {}

What it means

When installing a plugin from a local directory (`mise plugin install <name> <path>`), mise validates the source before installing. If the supplied path does not exist on the filesystem, install is aborted with this error. It protects against typos silently creating broken plugin installs.

Source

Thrown at src/plugins/mod.rs:553

    let path = PathBuf::from(repository);
    let source = PluginSource::parse(repository);
    if path.is_absolute() && path.is_dir() && matches!(&source, PluginSource::Zip { .. }) {
        return Some(path);
    }

    match source {
        PluginSource::Git {
            url,
            git_ref: None,
            subdir: None,
        } if url == repository => path.is_absolute().then_some(path),
        _ => None,
    }
}

pub(crate) fn validate_local_plugin_source(source: &Path, plugin_path: &Path) -> Result<()> {
    if !source.exists() {
        bail!(
            "local plugin directory does not exist: {}",
            display_path(source)
        );
    }
    if !source.is_dir() {
        bail!(
            "local plugin source is not a directory: {}",
            display_path(source)
        );
    }
    let resolved_source = file::desymlink_path(source);
    let resolved_plugin_path = match (plugin_path.parent(), plugin_path.file_name()) {
        (Some(parent), Some(file_name)) => file::desymlink_path(parent).join(file_name),
        _ => plugin_path.to_path_buf(),
    };
    if resolved_source
        .ancestors()
        .any(|path| file::paths_eq(path, &resolved_plugin_path))

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Check the path exists: ls <path>; fix typos or cd to the correct directory before re-running the install.
  2. Clone or restore the plugin repository to the expected directory first, then retry the install.
  3. Use an absolute path to rule out working-directory-relative resolution problems.

Example fix

// before
mise plugin install node ./plgins/my-plugin   # typo: directory doesn't exist
// after
mise plugin install node ./plugins/my-plugin  # path exists
Defensive patterns

Strategy: validation

Validate before calling

import std::path::Path;
fn ensure_dir_exists(p: &Path) -> std::io::Result<()> {
    if !p.exists() {
        return Err(std::io::Error::new(std::io::ErrorKind::NotFound, format!("{} does not exist", p.display())));
    }
    Ok(())
}

Try / catch

match install_local_plugin(name, path) {
    Err(e) if e.to_string().contains("does not exist") => {
        eprintln!("check the path: {}", path.display());
    }
    r => r,
}

Prevention

When it happens

Trigger: Running `mise plugin install <name> ./path/to/plugin` (or `mise install` flows routed through validate_local_plugin_source) where `source.exists()` returns false — the directory was deleted, moved, never created, or the path is misspelled.

Common situations: Typo in the plugin directory path; a relative path given from the wrong working directory; the plugin was cloned to a different location or removed; using a path before cloning the plugin repo.

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 jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/a34e73d863c479ba. Report an issue: GitHub.