nikivdev/code · error
No deployment config found. Use --url to specify a URL to ch
Error message
No deployment config found. Use --url to specify a URL to check.
What it means
The config loaded (flow.toml exists) but contains neither a [host] nor a [cloudflare] section, so no deployment target is defined and no URL can be derived for the health check.
Source
Thrown at src/deploy.rs:3149
// Try host domain first
if let Some(host) = &config.host {
if let Some(domain) = &host.domain {
let scheme = if host.ssl { "https" } else { "http" };
format!("{}://{}", scheme, domain)
} else {
bail!("No domain configured. Use --url to specify a URL to check.");
}
} else if let Some(cf) = &config.cloudflare {
// Use configured URL if present
if let Some(cf_url) = &cf.url {
cf_url.clone()
} else {
bail!(
"No URL configured in [cloudflare]. Add 'url = \"https://...\"' or use --url."
);
}
} else {
bail!("No deployment config found. Use --url to specify a URL to check.");
}
} else {
bail!("No flow.toml found. Use --url to specify a URL to check.");
};
println!("Checking health: {}", url);
let start = Instant::now();
// Use curl for simplicity (available everywhere)
let output = Command::new("curl")
.args([
"-sS",
"-o",
"/dev/null",
"-w",
"%{http_code}",
"--max-time",
"10",View on GitHub (pinned to a747e741ae)
Solutions
- Pass --url https://... to check a specific URL
- Add a [host] section with `domain` (and optional `ssl`) to flow.toml
- Add a [cloudflare] section with `url` to flow.toml
Example fix
// before (flow.toml) [build] command = "npm run build" // after [build] command = "npm run build" [host] domain = "example.com" ssl = true
Defensive patterns
Strategy: validation
Validate before calling
if config.host.is_none() && config.cloudflare.is_none() {
eprintln!("add [host] or [cloudflare] section to flow.toml (or pass --url)");
std::process::exit(1);
} Type guard
fn has_deploy_target(cfg: &Config) -> bool {
cfg.host.is_some() || cfg.cloudflare.is_some()
} Prevention
- Run a config lint/init step that requires a deployment section
- Keep flow.toml sections canonical; watch for typos in section names
- Always pass --url for ad-hoc checks against unconfigured projects
When it happens
Trigger: Running the health check in a project whose flow.toml has other sections only (build, deps, etc.) with no deployment config, and no --url flag.
Common situations: Freshly initialized flow.toml before the first deploy; project converted from another deploy tool; sections renamed/typos like [cloud_flare].
Related errors
- No domain configured. Use --url to specify a URL to check.
- No deployment config found in flow.toml. Add one of: [host]
- No production deploy config found in flow.toml. Add one of:
- No URL configured in [cloudflare]. Add 'url = "https://..."'
- ✗ Unhealthy: expected HTTP {}, got {} ({:.2}s)
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/5c2ca69a474c1f81.
Report an issue: GitHub.