jdx/mise · error
local plugin source is not a directory
Error message
local plugin source is not a directory: {} What it means
mise's `validate_local_plugin_source` checks a user-supplied local plugin path before installing it. After confirming the path exists, it verifies it is a directory; a plain file (or symlink to a file) is rejected because plugins are expected to be directory trees containing the plugin scripts. The error message includes the offending path via `display_path(source)`.
Solutions
- Point the install command at the plugin's directory, not a file inside it (e.g. the directory containing bin/ and lib/ scripts).
- If the plugin is a tarball or zip, extract it first and pass the extracted directory.
- Verify the path with `ls -la <path>` to confirm it is a directory and not a symlink to a file.
Example fix
// before mise plugin add nodejs ~/Downloads/vfox-nodejs.tar.gz // after tar -xzf ~/Downloads/vfox-nodejs.tar.gz -C ~/plugins mise plugin add nodejs ~/plugins/vfox-nodejs
Defensive patterns
Strategy: validation
Validate before calling
const p = Deno.statSync(src);
if (!p.isDirectory) throw new Error(`${src} must be a plugin directory`); Prevention
- Always pass the extracted plugin directory, never an archive or a file inside it.
- Check with `test -d <path>` in shell wrappers before invoking `mise plugin add`.
When it happens
Trigger: Calling `mise install <plugin> file:///path/to/a/file` or `mise plugin add <plugin> /path/to/a/file` where the path exists but `source.is_dir()` is false, i.e. a regular file was passed as the local plugin source.
Common situations: Typo where the user points at an archive/zip instead of the extracted plugin directory; passing a mise.plugin.toml file rather than its containing directory; a broken symlink situation where the path resolves to a file.
Related errors
- local plugin directory does not exist
- local plugin source cannot contain, be, or be inside the…
- managed file parent does not exist
- managed file parent is not a directory
- a parent directory is now a symlink; left untouched
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/4ca01aea4281e963.
Report an issue: GitHub.
Appendix: source
Thrown at src/plugins/mod.rs:559
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))
|| resolved_plugin_path
.ancestors()
.any(|path| file::paths_eq(path, &resolved_source))
{
bail!(
"local plugin source cannot contain, be, or be inside the plugin install path: {}",View on GitHub (pinned to 533346cc37)