denoland/deno · error
Installation path is not a directory
Error message
Installation path is not a directory
What it means
Error "Installation path is not a directory" thrown in denoland/deno.
Source
Thrown at cli/tools/installer/global.rs:257
flags: Arc<Flags>,
uninstall_flags: UninstallFlags,
) -> Result<(), AnyError> {
let uninstall_flags = match uninstall_flags.kind {
UninstallKind::Global(flags) => flags,
UninstallKind::Local(remove_flags) => {
return crate::tools::pm::remove(flags, remove_flags).await;
}
};
let cwd = resolve_cwd(flags.initial_cwd.as_deref())?;
let installation_dir =
get_installer_bin_dir(&cwd, uninstall_flags.root.as_deref())?;
// ensure directory exists
if let Ok(metadata) = fs::metadata(&installation_dir)
&& !metadata.is_dir()
{
return Err(anyhow!("Installation path is not a directory"));
}
for name in &uninstall_flags.packages {
let file_path = installation_dir.join(name);
let mut removed = remove_file_if_exists(&file_path)?;
if cfg!(windows) {
removed |= remove_file_if_exists(&file_path.with_extension("cmd"))?;
removed |= remove_file_if_exists(&file_path.with_extension("exe"))?;
}
if !removed {
return Err(anyhow!("No installation found for {}", name));
}
// There might be some extra files to delete
// Note: tsconfig.json is legacy. We renamed it to deno.json in January 2023.View on GitHub (pinned to 89f33cbef2)
When it happens
Trigger: Thrown at cli/tools/installer/global.rs:257 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16).
Data as JSON: /api/errors/d377a32996826ca9.
Report an issue: GitHub.