{"record":{"id":"0933b0de3a855782","repo":"nikivdev/code","slug":"no-production-deploy-config-found-in-flow-toml-a","errorCode":null,"errorMessage":"No production deploy config found in flow.toml.\n\nAdd one of:\n[host]\ndest = \"/opt/myapp\"\nrun = \"./server\"\n\n[cloudflare]\npath = \"worker\"\n\n[railway]\nproject = \"my-project\"\n\n[web]\npath = \"packages/web\"\n\nOr define a deploy-prod/prod task.","messagePattern":"No production deploy config found in flow\\.toml\\.\n\nAdd one of:\n\\[host\\]\ndest = \"/opt/myapp\"\nrun = \"\\./server\"\n\n\\[cloudflare\\]\npath = \"worker\"\n\n\\[railway\\]\nproject = \"my-project\"\n\n\\[web\\]\npath = \"packages/web\"\n\nOr define a deploy-prod/prod task\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":503,"sourceCode":"                    println!(\"Detected [cloudflare] config, deploying to Cloudflare...\");\n                    if let Err(err) = ensure_prod_cloudflare_routes(&project_root, cfg) {\n                        eprintln!(\"WARN prod route setup skipped: {err}\");\n                    }\n                    return deploy_cloudflare(&project_root, Some(cfg), false, false);\n                }\n\n                if cfg.railway.is_some() {\n                    println!(\"Detected [railway] config, deploying to Railway...\");\n                    return deploy_railway(&project_root, Some(cfg));\n                }\n\n                if cfg.web.is_some() {\n                    println!(\"Detected [web] config, deploying web...\");\n                    return deploy_web(&project_root, Some(cfg));\n                }\n            }\n\n            bail!(\n                \"No production deploy config found in flow.toml.\\n\\n\\\n                Add one of:\\n\\\n                [host]\\n\\\n                dest = \\\"/opt/myapp\\\"\\n\\\n                run = \\\"./server\\\"\\n\\n\\\n                [cloudflare]\\n\\\n                path = \\\"worker\\\"\\n\\n\\\n                [railway]\\n\\\n                project = \\\"my-project\\\"\\n\\n\\\n                [web]\\n\\\n                path = \\\"packages/web\\\"\\n\\n\\\n                Or define a deploy-prod/prod task.\"\n            );\n        }\n        Some(DeployAction::Host {\n            remote_build,\n            setup,\n        }) => deploy_host(&project_root, flow_config.as_ref(), remote_build, setup),","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L485-L521","documentation":"run_prod_with_project_context (production deploy) checks for production-capable config — [host], [cloudflare], [railway], or [web] — and for a deploy-prod/prod task; if none exists it bails with an extended message (it differs from error 395 by also accepting [web] and prod tasks). The library requires an explicit production target before deploying.","triggerScenarios":"Running `f deploy prod` on a flow.toml that has none of [host]/[cloudflare]/[railway]/[web] and no deploy-prod or prod task defined.","commonSituations":"Project configured only for local dev; team uses a differently-named prod task so the built-in lookup misses it; config file regenerated by setup without production sections; editing the wrong flow.toml in a monorepo.","solutions":["Add a production section to flow.toml (e.g. `[host]` with dest/run for the prod server).","Define a `deploy-prod` or `prod` task in flow.toml if your prod flow is custom.","If this project deploys only a web package, add `[web]` with the package path.","Copy the deploy section from the sibling project's flow.toml and adapt values."],"exampleFix":"# before: no prod target\n# after\n[host]\ndest = \"/opt/myapp-prod\"\nrun = \"./server\"","handlingStrategy":"validation","validationCode":"// Shell: ensure a production target exists before `f deploy prod`\ngrep -qE '^\\[(host|cloudflare|railway|web)\\]' flow.toml \\\n  || grep -qE '^\\[deploy_task\\.(deploy-prod|prod)\\]' flow.toml \\\n  || { echo \"no prod deploy config in flow.toml\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add production sections ([host], [cloudflare], [railway], or [web]) when the project goes to prod, not at first deploy.","If your prod flow is custom, name the task exactly `deploy-prod` or `prod` so the built-in lookup finds it.","Verify the prod flow.toml in a staging branch before the release deploy.","In monorepos, run `f deploy prod` from the package whose flow.toml holds prod config."],"tags":["config","production","deployment"],"backgroundTag":"missing-deploy-config","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}