denoland/deno · error
Found {} problem{}
Error message
Found {} problem{} What it means
`deno publish` type-checks packages and refuses 'slow types' — public APIs lacking explicit types — collecting every diagnostic before failing. This is the summary error: N diagnostics were emitted (each printed above with file and position), and without --allow-slow-types the publish aborts.
Source
Thrown at cli/tools/publish/diagnostics.rs:68
}
}
if errors > 0 {
if has_slow_types_errors {
log::error!(
"This package contains errors for slow types. Fixing these errors will:\n"
);
log::error!(
" 1. Significantly improve your package users' type checking performance."
);
log::error!(" 2. Improve the automatic documentation generation.");
log::error!(" 3. Enable automatic .d.ts generation for Node.js.");
log::error!(
"\nDon't want to bother? You can choose to skip this step by"
);
log::error!("providing the --allow-slow-types flag.\n");
}
Err(anyhow!(
"Found {} problem{}",
errors,
if errors == 1 { "" } else { "s" }
))
} else {
Ok(())
}
}
pub fn has_error(&self) -> bool {
self
.diagnostics
.lock()
.iter()
.any(|d| matches!(d.level(), DiagnosticLevel::Error))
}
pub fn push(&self, diagnostic: PublishDiagnostic) {View on GitHub (pinned to 89f33cbef2)
Solutions
- Fix the listed diagnostics: add explicit types at each reported file/position (start at the first error, later ones often cascade)
- As a conscious stopgap, publish with --allow-slow-types (hurts consumer type-checking, docs, and .d.ts generation)
- Run `deno publish --dry-run` locally and in CI so problems surface before a release
Example fix
// before
export function add(a, b) {
return a + b;
}
// after
export function add(a: number, b: number): number {
return a + b;
} Defensive patterns
Strategy: validation
Validate before calling
# catch slow types in CI before a release attempt deno publish --dry-run
Try / catch
# release script: fail with guidance when the summary error appears deno publish --dry-run 2>&1 | tee /tmp/publish.log if grep -q "Found .* problem" /tmp/publish.log; then echo 'fix the listed diagnostics or pass --allow-slow-types deliberately' >&2 exit 1 fi
Prevention
- Run deno publish --dry-run on every PR
- Write explicit types on anything exported from day one
- Treat --allow-slow-types as a documented, deliberate decision — never a default
When it happens
Trigger: `deno publish` (including --dry-run) where exported symbols rely on inference — missing parameter/return types on exported functions, implicit any in public class members — so the collector accumulated one or more errors.
Common situations: Porting untyped JS to JSR; exported helpers relying on inference; library surfaces where .d.ts generation and consumer type-checking speed depend on explicit types.
Related errors
- Failed to publish {} packages:
- Type checking failed: {}
- Invalid cron schedule: start=${start}, end=${end}, every=${e
- Invalid type for fetch: must be a function
- Failed to convert range to tsc text span: {:#}
AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16).
Data as JSON: /api/errors/cc5ecc566434c8bc.
Report an issue: GitHub.