{"record":{"id":"a969ef44d231ebf3","repo":"jdx/mise","slug":"tool-does-not-have-an-executable-named-a969ef","errorCode":null,"errorMessage":"Tool '{}' does not have an executable named '{}'. Available executables: {}","messagePattern":"Tool '(.+?)' does not have an executable named '(.+?)'\\. Available executables: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/tool_stub.rs","lineNumber":618,"sourceCode":"            .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(\", \")\n                    );\n                }\n            }\n        },\n    }\n}\n\n/// Execute a tool stub\n///\n/// Tool stubs are executable files containing TOML configuration that specify\n/// which tool to run and how to run it. They provide a convenient way to create\n/// portable, self-contained executables that automatically manage tool installation\n/// and execution.\n///","sourceCodeStart":600,"sourceCodeEnd":636,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/tool_stub.rs#L600-L636","documentation":"Same failure as the plain BinNotFound case — the installed tool does not ship an executable with the requested name — but mise found other binaries in the tool's install and appends them as 'Available executables: ...' to guide the correction.","triggerScenarios":"`mise x node@22 -- nodemon ...` when node's bin dir contains node, npm, npx, etc.; any mise exec/x invocation naming a bin that misses but near-matches installed bins.","commonSituations":"Typos caught only after running; tools exposing differently-cased or -suffixed binaries (python3 vs python); switching tool versions that ship different bin sets.","solutions":["Pick the correct name from the 'Available executables' list in the message and rerun","If the needed binary truly is missing, install the package/plugin variant that provides it","Pin a different tool version that ships the expected executable"],"exampleFix":"// before\nmise x python@3.12 -- python3.11 -V\n// after\nmise x python@3.12 -- python3 -V  # listed under Available executables","handlingStrategy":"validation","validationCode":"const dir = exec('mise where '+tool).trim();\nconst bins = fs.readdirSync(path.join(dir,'bin'));\nif (!bins.includes(bin)) bin = bins.find(b=>b.startsWith(bin)) ?? bin;","typeGuard":"const resolveBin = (bin: string, available: string[]): string | null =>\n  available.includes(bin) ? bin : (available.find(b => b.startsWith(bin)) ?? null);","tryCatchPattern":"try { exec(`mise x ${tool} -- ${bin}`); } catch (e) { const m = String(e).match(/Available executables: (.*)/); if (m) bin = m[1].split(', ')[0]; else throw e; }","preventionTips":["Read the 'Available executables' list in the message — it names the correct bin","Diff bin sets between tool versions before pinning upgrades","Use exact bin names from `ls $(mise where <tool>)/bin` in scripts"],"tags":["cli","tools","executable","not-found"],"backgroundTag":"command-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"}