{"record":{"id":"f532dbe36c8c7936","repo":"BoundaryML/baml","slug":"baml-toolchain-version-is-not-installed-installed-toolchains","errorCode":null,"errorMessage":"BAML toolchain {version} is not installed.\nInstalled toolchains: {}\nRun: baml toolchain install {version}","messagePattern":"BAML toolchain (.+?) is not installed\\.\nInstalled toolchains: (.+?)\nRun: baml toolchain install (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml/src/main.rs","lineNumber":648,"sourceCode":"            )),\n        };\n    }\n    Ok(selector.selector.clone())\n}\n\nfn missing_toolchain_error(selector: &ResolvedSelector, version: &str) -> anyhow::Error {\n    let installed = installed_toolchains().join(\", \");\n    match &selector.source {\n        SelectorSource::Project(path) => anyhow!(\n            \"{} [toolchain] pins version {version}, but it isn't installed.\\nInstalled toolchains: {}\\nRun: baml toolchain install {version}\",\n            path.display(),\n            if installed.is_empty() {\n                \"(none)\"\n            } else {\n                &installed\n            }\n        ),\n        _ => anyhow!(\n            \"BAML toolchain {version} is not installed.\\nInstalled toolchains: {}\\nRun: baml toolchain install {version}\",\n            if installed.is_empty() {\n                \"(none)\"\n            } else {\n                &installed\n            }\n        ),\n    }\n}\n\nfn cli_exe_name() -> &'static str {\n    if cfg!(windows) {\n        \"baml-cli.exe\"\n    } else {\n        \"baml-cli\"\n    }\n}\n","sourceCodeStart":630,"sourceCodeEnd":666,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml/src/main.rs#L630-L666","documentation":"Fires when the resolved concrete version is not installed locally but the selector did not come from project config (env var or global default). The wrapper reached the exec stage believing a version was active, but the toolchains directory has no such version — typically after the state file references an uninstalled version or a partial uninstall.","triggerScenarios":"Thrown at baml_language/crates/baml/src/main.rs:648 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the missing version: `baml toolchain install <version>`","If the version was removed intentionally, re-select a valid toolchain: `baml toolchain use canary` (or another installed version)","Check `baml toolchain list` to see which versions are available locally"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}