{"record":{"id":"76ed9dfb7f98243d","repo":"denoland/deno","slug":"error","errorCode":null,"errorMessage":"{:#}","messagePattern":"\\{:#\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/lint/mod.rs","lineNumber":478,"sourceCode":"      );\n    }\n\n    let workspace_module_graph_future =\n      self.workspace_module_graph.as_ref().unwrap().clone();\n    let maybe_publish_config = member_dir.maybe_package_config();\n    let publish_config = maybe_publish_config?;\n\n    let has_error = self.has_error.clone();\n    let reporter_lock = self.reporter_lock.clone();\n    let linter = linter.clone();\n    let path_urls = paths\n      .iter()\n      .filter_map(|p| ModuleSpecifier::from_file_path(p).ok())\n      .collect::<HashSet<_>>();\n    let fut = async move {\n      let graph = workspace_module_graph_future\n        .await\n        .map_err(|err| anyhow!(\"{:#}\", err))?;\n      let export_urls =\n        publish_config.config_file.resolve_export_value_urls()?;\n      if !export_urls.iter().any(|url| path_urls.contains(url)) {\n        return Ok(()); // entrypoint is not specified, so skip\n      }\n      let diagnostics = linter.lint_package(&graph, &export_urls);\n      if !diagnostics.is_empty() {\n        has_error.raise();\n        let mut reporter = reporter_lock.lock();\n        for diagnostic in &diagnostics {\n          reporter.visit_diagnostic(diagnostic);\n        }\n      }\n      Ok(())\n    }\n    .boxed_local();\n    Some(fut)\n  }","sourceCodeStart":460,"sourceCodeEnd":496,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/lint/mod.rs#L460-L496","documentation":"Inside the publish-oriented lint pass, Deno builds a module graph for the workspace and awaits a shared future. If graph construction fails (unresolved specifier, missing file, unreadable module), the error is re-wrapped as anyhow!(\"{:#}\", err), which prints the flattened error chain. The real cause is whatever module-graph failure the original error carried — this message is only the wrapper.","triggerScenarios":"`deno publish` (or linting a package with a publish config) where the module graph cannot be built: an exported file imports a specifier that cannot be resolved, a dependency is missing from config, or a reachable file was deleted/moved.","commonSituations":"Export maps pointing at files excluded from publishing; imports of packages absent from deno.json; moving files without updating exports; stale caches after dependency changes.","solutions":["Read the text after 'Error:' — it names the underlying graph failure (specifier/path); fix that first","Run `deno check` on the exported entrypoints to surface the same graph breakage directly","Ensure every file reachable from exports exists and its imports are declared","Run `deno publish --dry-run` locally before tagging a release"],"exampleFix":"// deno.json exports \"./mod.ts\" but mod.ts imports \"./missing.ts\"\n// before: export { helper } from \"./missing.ts\";\n// after: create missing.ts, or remove/repoint the import","handlingStrategy":"try-catch","validationCode":"# surface graph breakage with better context before publishing\ndeno check ./mod.ts && deno publish --dry-run","typeGuard":null,"tryCatchPattern":"# CI step: catch the failure and point at the underlying cause\n- name: publish preflight\n  run: |\n    deno publish --dry-run || {\n      echo '::error::module graph failure — the real cause is the Error: line above'\n      exit 1\n    }","preventionTips":["Run deno check on exported entrypoints in CI before publish","Keep export maps in sync when files move","Never import files outside the published subtree"],"tags":["publish","module-graph","lint","imports"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}