{"record":{"id":"c1941631db35aaf2","repo":"nikivdev/code","slug":"no-deployment-config-found-in-flow-toml-add-one","errorCode":null,"errorMessage":"No deployment 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\nOr run:\nf deploy setup","messagePattern":"No deployment 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\nOr run:\nf deploy setup","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":367,"sourceCode":"                        task_name,\n                        available_tasks(cfg)\n                    );\n                }\n\n                if cfg.host.is_some() || cfg.cloudflare.is_some() || cfg.railway.is_some() {\n                    return auto_deploy(&project_root, Some(cfg));\n                }\n                if tasks::find_task(cfg, \"deploy\").is_some() {\n                    return tasks::run(TaskRunOpts {\n                        config: config_path,\n                        delegate_to_hub: false,\n                        hub_host: std::net::IpAddr::from([127, 0, 0, 1]),\n                        hub_port: 9050,\n                        name: \"deploy\".to_string(),\n                        args: Vec::new(),\n                    });\n                }\n                bail!(\n                    \"No deployment config found in flow.toml and no 'deploy' task is defined.\\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                    Or run:\\n\\\n                    f deploy setup\"\n                );\n            }\n\n            bail!(\"No flow.toml found. Run `f setup` first.\")\n        }\n        Some(DeployAction::Host {\n            remote_build,","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L349-L385","documentation":"run_with_project_context found a flow.toml but it contains no deployment configuration ([host], [cloudflare], [railway]) and no 'deploy' task is defined. The library refuses to guess a deployment target and bails with a message enumerating the accepted config sections and the `f deploy setup` wizard.","triggerScenarios":"Running `f deploy` in a project whose flow.toml has only unrelated sections (no [host]/[cloudflare]/[railway]) and no deploy task entry.","commonSituations":"Fresh project where `f setup` was skipped or never wrote deploy config; config file truncated or hand-edited to remove the deploy section; wrong directory — flow.toml present but belonging to a template without deploy config.","solutions":["Run `f deploy setup` to generate the deployment config interactively.","Manually add a deploy section to flow.toml (e.g. `[host]` with `dest` and `run`).","Define a `deploy` task in flow.toml as an alternative to a built-in section.","Confirm you are in the intended project root whose flow.toml has deploy config."],"exampleFix":"# before: flow.toml without deploy config\n# after\n[host]\ndest = \"/opt/myapp\"\nrun = \"./server\"","handlingStrategy":"validation","validationCode":"// Shell: ensure a deploy section exists in flow.toml before deploying\ngrep -qE '^\\[(host|cloudflare|railway)\\]' flow.toml || grep -qE '^\\[deploy_task\\.deploy\\]' flow.toml \\\n  || { echo \"flow.toml has no deploy config — run 'f deploy setup'\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `f deploy setup` immediately after `f setup` on new projects.","Commit flow.toml with its deploy section so fresh clones work.","Add a CI check that flow.toml contains a deploy section before deploy jobs.","Keep [host]/[cloudflare]/[railway] sections in the repo-root flow.toml, not a subfolder."],"tags":["config","deployment","flow-toml"],"backgroundTag":"missing-deploy-config","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}