denoland/deno · info
Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE
Error message
Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE
What it means
With `DENO_INTERNAL_FAST_CHECK_OVERWRITE=1`, publish writes each file module's fast-check (public API) output back to the source files on disk, then deliberately stops with this bail before type checking and publishing continue — nothing is uploaded. It is the internal mode's designed early exit, not a failure of your package.
Source
Thrown at cli/tools/publish/mod.rs:459
);
}
for module in graph.modules() {
if module.specifier().scheme() != "file" {
continue;
}
let Some(js) = module.js() else {
continue;
};
if let Some(module) = js.fast_check_module() {
std::fs::write(
js.specifier.to_file_path().unwrap(),
module.source.as_ref(),
)?;
}
}
bail!("Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE")
} else {
log::info!("Checking for slow types in the public API...");
for package in package_configs {
let export_urls = package.config_file.resolve_export_value_urls()?;
let diagnostics =
collect_no_slow_type_diagnostics(&graph, &export_urls);
if !diagnostics.is_empty() {
for diagnostic in diagnostics {
diagnostics_collector
.push(PublishDiagnostic::FastCheck(diagnostic));
}
}
}
// skip type checking the slow type graph if there are any errors because
// errors like remote modules existing will cause type checking to crash
if diagnostics_collector.has_error() {
Ok(Arc::new(graph))View on GitHub (pinned to f7822238ca)
Solutions
- Treat this exit as success when using the flag — the file rewrite already happened; inspect the result with `git diff`.
- Unset the env var to run a normal publish: `unset DENO_INTERNAL_FAST_CHECK_OVERWRITE`.
Example fix
# before: unexpected non-zero exit breaks scripts DENO_INTERNAL_FAST_CHECK_OVERWRITE=1 deno publish --dry-run # after: the rewrite is the goal, so accept the designed stop DENO_INTERNAL_FAST_CHECK_OVERWRITE=1 deno publish --dry-run || true git diff --stat
Defensive patterns
Strategy: fallback
Validate before calling
#!/usr/bin/env bash
if [ "${DENO_INTERNAL_FAST_CHECK_OVERWRITE:-}" = "1" ]; then
deno publish --dry-run || true # designed stop after the source rewrite
git diff --stat # inspect the rewritten output
else
deno publish
fi Try / catch
# the bail is the internal mode's success path — branch on the env var, not the exit code if DENO_INTERNAL_FAST_CHECK_OVERWRITE=1 deno publish --dry-run; then : # unexpected: mode should stop with the bail else rc=$? [ "$rc" -ne 0 ] && echo "fast-check rewrite finished (exit $rc is expected)" fi
Prevention
- Treat a non-zero exit after DENO_INTERNAL_FAST_CHECK_OVERWRITE=1 as the expected stop, not a failure.
- Never leave the env var set for real publishes — it always terminates before uploading.
- Follow the run with `git diff` to review the rewritten public-API output.
When it happens
Trigger: Running `deno publish` with `DENO_INTERNAL_FAST_CHECK_OVERWRITE=1` and a clean repo: after overwriting the module sources, execution always terminates here.
Common situations: Deno internal development workflows that regenerate fast-check output and diff it (e.g. `git diff` afterwards) in CI.
Related errors
- When using DENO_INTERNAL_FAST_CHECK_OVERWRITE, the git repo
- Failed ensuring public API type output is valid. {:#} You
- ${name} is already registered
- JS PANIC: {}
- displaying graphs that have multiple roots is not supported.
AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20).
Data as JSON: /api/errors/111bcf997c92493b.
Report an issue: GitHub.