{"record":{"id":"038ab96cfbfc3d58","repo":"jdx/mise","slug":"tool-not-found","errorCode":null,"errorMessage":"Tool '{}' not found","messagePattern":"Tool '(.+?)' not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/tool_stub.rs","lineNumber":604,"sourceCode":"                    env.insert(\n                        crate::env::PATH_KEY.to_string(),\n                        std::env::join_paths(paths)?.to_string_lossy().to_string(),\n                    );\n                }\n            }\n            crate::cli::exec::exec_program(\n                bin_path,\n                args,\n                env,\n                env_remove,\n                &Default::default(),\n                false,\n            )\n            .await\n        }\n        Err(e) => match e {\n            BinPathError::ToolNotFound(tool_name) => {\n                bail!(\"Tool '{}' not found\", tool_name);\n            }\n            BinPathError::BinNotFound {\n                tool_name,\n                bin,\n                available_bins,\n            } => {\n                if available_bins.is_empty() {\n                    bail!(\n                        \"Tool '{}' does not have an executable named '{}'\",\n                        tool_name,\n                        bin\n                    );\n                } else {\n                    bail!(\n                        \"Tool '{}' does not have an executable named '{}'. Available executables: {}\",\n                        tool_name,\n                        bin,\n                        available_bins.join(\", \")","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/tool_stub.rs#L586-L622","documentation":"When resolving a tool+binary for execution (e.g. `mise x`/`mise exec`), mise maps a bin-path failure to a user-facing error. `BinPathError::ToolNotFound` means no installed version matched the requested tool, so there is nothing to run.","triggerScenarios":"`mise x node@99 -- node -v` or `mise x python -- ...` when the named tool has no matching installed version; typo in tool name passed via tool arguments to exec/x.","commonSituations":"Referencing a tool not in mise.toml/.tool-versions and not installed; renaming tools in config without reinstalling; misspelled tool name in `mise x`.","solutions":["Run `mise ls` to see installed tools and `mise ls-remote <tool>` for available versions","Install the tool first: mise use node@22 (or mise install node@22)","Fix the tool-name spelling in the command or config file"],"exampleFix":"// before\nmise x nod@22 -- node -v\n// after\nmise use node@22 && mise x node -- node -v","handlingStrategy":"validation","validationCode":"const installed = exec('mise ls --json');\nfunction toolInstalled(name){ return JSON.parse(installed).some(t=>t.tool===name); }\nif (!toolInstalled('node')) exec('mise install node');","typeGuard":"const isInstalled = (tool: string, list: {tool:string;installed?:string[]}[]) =>\n  list.some(t => t.tool === tool && (t.installed?.length ?? 0) > 0);","tryCatchPattern":"try { exec(`mise x ${tool}@${ver} -- ${cmd}`); } catch (e) { if (String(e).includes('not found')) { exec(`mise install ${tool}`); retry(); } else throw e; }","preventionTips":["Pin tools in mise.toml so `mise install` provisions them before exec","Verify spelling with `mise ls-remote <tool>`","Run `mise ls` after version changes to confirm installed state"],"tags":["cli","tools","not-found"],"backgroundTag":"entity-not-found","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"}