{"record":{"id":"d377a32996826ca9","repo":"denoland/deno","slug":"installation-path-is-not-a-directory","errorCode":null,"errorMessage":"Installation path is not a directory","messagePattern":"Installation path is not a directory","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/installer/global.rs","lineNumber":257,"sourceCode":"  flags: Arc<Flags>,\n  uninstall_flags: UninstallFlags,\n) -> Result<(), AnyError> {\n  let uninstall_flags = match uninstall_flags.kind {\n    UninstallKind::Global(flags) => flags,\n    UninstallKind::Local(remove_flags) => {\n      return crate::tools::pm::remove(flags, remove_flags).await;\n    }\n  };\n\n  let cwd = resolve_cwd(flags.initial_cwd.as_deref())?;\n  let installation_dir =\n    get_installer_bin_dir(&cwd, uninstall_flags.root.as_deref())?;\n\n  // ensure directory exists\n  if let Ok(metadata) = fs::metadata(&installation_dir)\n    && !metadata.is_dir()\n  {\n    return Err(anyhow!(\"Installation path is not a directory\"));\n  }\n\n  for name in &uninstall_flags.packages {\n    let file_path = installation_dir.join(name);\n\n    let mut removed = remove_file_if_exists(&file_path)?;\n\n    if cfg!(windows) {\n      removed |= remove_file_if_exists(&file_path.with_extension(\"cmd\"))?;\n      removed |= remove_file_if_exists(&file_path.with_extension(\"exe\"))?;\n    }\n\n    if !removed {\n      return Err(anyhow!(\"No installation found for {}\", name));\n    }\n\n    // There might be some extra files to delete\n    // Note: tsconfig.json is legacy. We renamed it to deno.json in January 2023.","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/installer/global.rs#L239-L275","documentation":"Error \"Installation path is not a directory\" thrown in denoland/deno.","triggerScenarios":"Thrown at cli/tools/installer/global.rs:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}