{"record":{"id":"8e676fd800515d29","repo":"jdx/mise","slug":"name-is-not-an-active-installed-tool-or-one-of","errorCode":null,"errorMessage":"{name} is not an active, installed tool or one of their executables","messagePattern":"(.+?) is not an active, installed tool or one of their executables","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/packslip.rs","lineNumber":1041,"sourceCode":"}\n\n/// The active, installed tool called `name`, or the one providing an\n/// executable called `name`.\nasync fn find_tool(\n    config: &Arc<Config>,\n    ts: &Toolset,\n    name: &str,\n) -> Result<(Arc<dyn Backend>, ToolVersion)> {\n    if let Some(found) = ts.which(config, name).await {\n        return Ok(found);\n    }\n    let by_name = ts\n        .list_current_installed_versions(config)\n        .into_iter()\n        .find(|(b, _)| b.ba().short == name || b.tool_name() == name || b.id() == name);\n    match by_name {\n        Some(found) => Ok(found),\n        None => bail!(\"{name} is not an active, installed tool or one of their executables\"),\n    }\n}\n\n/// Run one of the tool's own executables and return what it printed.\nasync fn run_tool(\n    config: &Arc<Config>,\n    backend: &Arc<dyn Backend>,\n    tv: &ToolVersion,\n    argv: &[String],\n    env: &BTreeMap<String, String>,\n) -> Result<String> {\n    let Some((program, args)) = argv.split_first() else {\n        bail!(\"an exec entry with no command\");\n    };\n    let Some(path) = backend.which(config, tv, program).await? else {\n        bail!(\"{} has no executable called {program}\", tv.style());\n    };\n    run_resource_command(","sourceCodeStart":1023,"sourceCodeEnd":1059,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/packslip.rs#L1023-L1059","documentation":"find_tool looks up a tool by short name, tool name, or id among the currently active/installed toolset versions. If no installed tool matches `name`, it bails. This is mise's guard for commands that operate on an already-installed, active tool (e.g. deriving completion scripts), not for arbitrary uninstalled names.","triggerScenarios":"Calling completion_script with a name that is not in ts.list_current_installed_versions(config) — the tool isn't installed, isn't active in the current config, or the name doesn't match short name, tool_name, or id.","commonSituations":"Typo in the tool name; the tool is pinned in a config file but never installed; the tool is active only in another directory's mise.toml; querying by an alias or executable name that doesn't equal the backend short name, tool name, or id.","solutions":["Run `mise ls` to confirm the tool is installed and active in the current project.","Install the missing tool (`mise use <tool>` or `mise install <tool>`).","Use the exact tool name/id as shown by `mise ls` (short name like `node`, full tool name, or backend id like `npm:typescript`).","cd into (or add config for) the project where the tool is active before running the command."],"exampleFix":"// before: querying an uninstalled tool\nmise resource completions ripgrep\n\n// after: install first, use the active tool's name\nmise use ripgrep\nmise resource completions ripgrep","handlingStrategy":"validation","validationCode":"let active: Vec<String> = ts.list_current_installed_versions(config)\n    .into_iter()\n    .map(|(b, _)| b.ba().short)\n    .collect();\nif !active.contains(&name) {\n    eprintln!(\"{name} is not installed/active. Active: {active:?}\");\n}","typeGuard":null,"tryCatchPattern":"match find_tool(config, &ts, &name) {\n    Ok(tv) => run_tool(config, tv).await?,\n    Err(e) if e.to_string().contains(\"not an active, installed tool\") => {\n        eprintln!(\"Install it first: mise use {name}\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Run `mise ls` to confirm a tool is installed and active before referencing it by name.","Use exact names/ids as reported by mise (short name, tool name, or backend id).","cd into the project whose config activates the tool, or add it to the current config."],"tags":["toolset","cli","not-installed","mise"],"backgroundTag":"resource-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}