{"record":{"id":"f9a18b77b91cc823","repo":"jdx/mise","slug":"daemon-requires-tool-version","errorCode":null,"errorMessage":"daemon {} requires {tool}@{version}","messagePattern":"daemon (.+?) requires (.+?)@(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/daemons/runtime.rs","lineNumber":398,"sourceCode":"    doc.insert(\"daemons\".into(), toml::Value::Table(daemons));\n    Ok(header + &toml::to_string_pretty(&doc)?)\n}\n\npub(crate) async fn validate_tools(\n    set: &DaemonSet,\n    config: &Arc<Config>,\n    ts: &Toolset,\n) -> Result<()> {\n    for daemon in set.daemons.values() {\n        let Some((tool, version)) = &daemon.tool else {\n            continue;\n        };\n        if cfg!(windows) {\n            bail!(\"daemon presets are not supported on Windows yet\");\n        }\n        let ba: crate::cli::args::BackendArg = tool.as_str().into();\n        let Some(versions) = ts.versions.get(&ba) else {\n            bail!(\"daemon {} requires {tool}@{version}\", daemon.name);\n        };\n        let actual = versions\n            .versions\n            .first()\n            .ok_or_else(|| eyre::eyre!(\"missing {tool}\"))?;\n        let compatible = ba\n            .backend()?\n            .list_installed_versions_matching(version)\n            .contains(&actual.version);\n        if compatible {\n            continue;\n        }\n        let requested = ToolRequest::new(\n            ba.into(),\n            version,\n            ToolSource::MiseTomlDaemon(daemon.source.clone()),\n        )?\n        .resolve(","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/daemons/runtime.rs#L380-L416","documentation":"Each daemon preset entry may pin a tool and version (e.g. postgres@16). validate_tools looks up that tool's BackendArg in the resolved Toolset versions; if the tool is not present in the toolset at all, mise bails telling you which daemon needs which tool@version. The daemon cannot run because its backing tool was never selected for installation.","triggerScenarios":"A [daemons] entry declares tool = \"postgres\" version \"16\" (any version), but the resolved Toolset's versions map has no entry for that BackendArg — the tool is absent from [tools] in mise.toml, .tool-versions, or any other config source.","commonSituations":"Adding a daemon preset to mise.toml but forgetting to add the corresponding tool to [tools]; a teammate's config requires a tool your machine's config files don't list; a typo in the tool name so it never resolves.","solutions":["Add the tool to [tools] in mise.toml (e.g. postgres = \"16\") so it is installed and selected.","Run `mise install` after adding the tool to make sure the version is present locally.","Fix typos in the daemon's tool field so it matches a real tool/backend.","Confirm with `mise ls <tool>` that the tool resolves in the project directory."],"exampleFix":"// before\n[daemons.db]\ntool = \"postgres\"\nversion = \"16\"\n\n// after\n[tools]\npostgres = \"16\"\n\n[daemons.db]\ntool = \"postgres\"\nversion = \"16\"","handlingStrategy":"validation","validationCode":"# Confirm each daemon's tool resolves before starting daemons\nfor tool in $(mise ls --parseable | cut -d'#' -f1); do :; done\nmise ls postgres || echo \"daemon tool missing from [tools]\"","typeGuard":null,"tryCatchPattern":"try {\n  await mise.daemons.start();\n} catch (e) {\n  const m = String(e).match(/daemon (\\S+) requires (\\S+)@(\\S+)/);\n  if (m) console.error(`Add ${m[2]} = \"${m[3]}\" to [tools] for daemon ${m[1]}.`);\n}","preventionTips":["Every time you add a [daemons] entry, add its tool to [tools] in the same change","Run `mise install` and `mise ls <tool>` after config edits","Verify tool names resolve via `mise which <tool>` (catches typos)"],"tags":["daemon","missing-tool","mise-toml"],"backgroundTag":"missing-dependency","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}