{"record":{"id":"ab4947a2e02951ca","repo":"denoland/deno","slug":"workspace-root-is-not-a-local-directory-ab4947","errorCode":null,"errorMessage":"workspace root is not a local directory","messagePattern":"workspace root is not a local directory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/installer/local.rs","lineNumber":273,"sourceCode":") -> Result<(), AnyError> {\n  use crate::args::TsTypeLib;\n  use crate::graph_container::CollectSpecifiersOptions;\n\n  let factory = CliFactory::from_flags(flags);\n  let cli_options = factory.cli_options()?;\n  let file_fetcher = factory.file_fetcher()?.clone();\n  let http_client = factory.http_client_provider().get_or_create()?;\n  let permissions = factory.root_permissions_container()?.clone();\n\n  // Generate at the workspace/config root, not the current working directory,\n  // so running `deno sync-types` from a subdirectory still writes the config\n  // next to deno.json and picks up the root import map.\n  let project_root = cli_options\n    .workspace()\n    .root_dir_url()\n    .to_file_path()\n    .map_err(|_| {\n      deno_core::anyhow::anyhow!(\"workspace root is not a local directory\")\n    })?;\n\n  let has_explicit_roots = !sync_types_flags.roots.is_empty();\n  let root_patterns = if has_explicit_roots {\n    sync_types_flags.roots\n  } else {\n    vec![\".\".to_string()]\n  };\n\n  // Build the module graph over either the requested roots or the whole\n  // project to discover every external (npm:/jsr:/http(s):) specifier the code\n  // actually uses — including specifiers written directly in source and across\n  // workspace members, not just those declared in the root import map.\n  let (graph_specifiers, local_wasm_modules) = {\n    let graph_container = factory.main_module_graph_container().await?;\n    let roots = graph_container.collect_specifiers(\n      &root_patterns,\n      CollectSpecifiersOptions {","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/installer/local.rs#L255-L291","documentation":"Error \"workspace root is not a local directory\" thrown in denoland/deno.","triggerScenarios":"Thrown at cli/tools/installer/local.rs:273 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"}