{"record":{"id":"f97dc2c4036a3abc","repo":"denoland/deno","slug":"native-tsc-exited-with-without-parseable-diagno","errorCode":null,"errorMessage":"native tsc exited with {} without parseable diagnostics{}","messagePattern":"native tsc exited with (.+?) without parseable diagnostics(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/check.rs","lineNumber":395,"sourceCode":"    log::error!(\"{}\\n\", diagnostics);\n    return Err(deno_core::anyhow::anyhow!(\"Type checking failed.\"));\n  }\n\n  // tsc exited non-zero but we have nothing to show. If it printed diagnostic\n  // lines we deliberately dropped (e.g. `noImplicitOverride` in remote modules),\n  // its exit code is expected - treat the check as clean. Only when tsc produced\n  // no recognizable diagnostics at all is this a genuine failure (an internal\n  // error or a malformed generated config); surface whatever it printed then.\n  let tsc_reported_diagnostics =\n    crate::tsc::native::output_has_diagnostics(&stdout);\n  if !output.status.success() && !tsc_reported_diagnostics {\n    let detail = stdout.trim();\n    let detail = if detail.is_empty() {\n      stderr.trim()\n    } else {\n      detail\n    };\n    return Err(deno_core::anyhow::anyhow!(\n      \"native tsc exited with {} without parseable diagnostics{}\",\n      output.status,\n      if detail.is_empty() {\n        String::new()\n      } else {\n        format!(\":\\n{detail}\")\n      }\n    ));\n  }\n\n  // Type-checked clean: record the hash so an unchanged re-check skips tsc.\n  if let Some(check_hash) = maybe_check_hash {\n    type_check_cache.add_check_hash(check_hash);\n  }\n\n  Ok(())\n}\n","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/tools/check.rs#L377-L413","documentation":"The native tsc child process exited non-zero but its output contained no diagnostics Deno could parse. That means tsc itself failed — internal error, malformed generated tsconfig, bad option plumbing — rather than finding type errors. Deno appends whatever tsc printed (stdout, else stderr) as the detail.","triggerScenarios":"A tsc crash (stack trace, out of memory), an invalid option forwarded from `compilerOptions` into the generated tsconfig, or a tsc CLI error — anything that exits non-zero without diagnostic-shaped output lines.","commonSituations":"Invalid or misspelled `compilerOptions` in deno.json being passed through to tsc; exotic `extends` chains; tsc running out of memory on very large projects.","solutions":["Read the appended detail — it usually names the exact bad option or shows the crash","Remove or simplify `compilerOptions` in deno.json until the check runs, then re-add options one by one","Update deno; if the detail is empty or shows a pure tsc crash, report with a minimal repro"],"exampleFix":"// before (deno.json): misspelled target crashes tsc\n{ \"compilerOptions\": { \"target\": \"esnextt\" } }\n\n// after\n{ \"compilerOptions\": { \"target\": \"esnext\" } }","handlingStrategy":"try-catch","validationCode":"// Validate compilerOptions against known tsc option names before check runs\nconst config = JSON.parse(await Deno.readTextFile(\"deno.json\"));\nconst known = new Set([\"target\", \"lib\", \"strict\", \"jsx\", \"paths\", \"types\"]);\nfor (const key of Object.keys(config.compilerOptions ?? {})) {\n  if (!known.has(key)) throw new Error(`unknown compilerOption: ${key}`);\n}","typeGuard":null,"tryCatchPattern":"Catch the error and surface the appended detail verbatim — it contains tsc's raw output naming the failing option or crash; fix the config rather than retrying.","preventionTips":["Keep compilerOptions minimal and validated against the TS schema","Avoid exotic extends chains in generated-config contexts","Update deno before debugging deeper — tsc integration fixes land often"],"tags":["check","tsc","compiler-options","crash"],"backgroundTag":"compiler-exited-without-diagnostics","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}