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 source, mise validates the source path before use. If the path does not exist on disk, validate_local_plugin_source bails with the displayed path, preventing a confusing failure later during clone/link of the plugin.

Solutions

  1. Check the path printed in the error and correct the typo or update the config to the actual plugin directory
  2. Create/restore the plugin directory if it was deleted, or clone it from its origin first
  3. Use an absolute path for local plugin sources to avoid working-directory ambiguity

Example fix

// before
mise plugin install my-plugin ./pluginz/my-plugin
// after
mise plugin install my-plugin /home/me/plugins/my-plugin
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs');
if (!fs.existsSync(pluginDir) || !fs.statSync(pluginDir).isDirectory()) throw new Error(`Local plugin dir missing: ${pluginDir}`);

Type guard

function isExistingDir(p) { try { return fs.statSync(p).isDirectory(); } catch { return false; } }

Try / catch

try { await miseInstall(); } catch (e) { if (String(e).includes('local plugin directory does not exist')) { console.error('Fix or create the referenced plugin path:', e.message); } else throw e; }

Prevention

When it happens

Trigger: `mise install` (or `mise plugin install name /path/to/plugin`) where the local source path passed for a plugin does not exist — typo'd path, deleted directory, path relative to the wrong working directory.

Common situations: Typo in a path in mise.toml or on the CLI; a plugin directory removed after being referenced in config; running the command from a different directory than where a relative path was intended to resolve.

Related errors


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

Appendix: 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 533346cc37)