{"record":{"id":"6e5dc908a29aaf09","repo":"asdf-vm/asdf","slug":"executable-not-found","errorCode":null,"errorMessage":"executable not found","messagePattern":"executable not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cli/cli.go","lineNumber":715,"sourceCode":"\n\t\t\t\tlogger.Printf(\"or add one of the following versions in your config file at %s/.tool-versions\\n\", currentDir)\n\t\t\t}\n\n\t\t\tfor _, toolVersion := range toolVersions {\n\t\t\t\tfor _, version := range toolVersion.Versions {\n\t\t\t\t\tlogger.Printf(\"%s %s\\n\", toolVersion.Name, version)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tos.Exit(126)\n\t\treturn executable, plugins.Plugin{}, \"\", err\n\t}\n\n\tif !found {\n\t\tlogger.Print(\"executable not found\")\n\t\tos.Exit(126)\n\t\treturn executable, plugins.Plugin{}, \"\", fmt.Errorf(\"executable not found\")\n\t}\n\n\treturn executable, plugin, version, nil\n}\n\nfunc anyInstalled(conf config.Config, toolVersions []toolversions.ToolVersions) bool {\n\tfor _, toolVersion := range toolVersions {\n\t\tfor _, version := range toolVersion.Versions {\n\t\t\tversion := toolversions.Parse(version)\n\t\t\tplugin := plugins.New(conf, toolVersion.Name)\n\t\t\tif installs.IsInstalled(conf, plugin, version) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/asdf-vm/asdf/blob/074a1722ca88d6677f228541ce06efaf4f9924d4/internal/cli/cli.go#L697-L733","documentation":"getExecutable returns this error when, after walking the current tool versions, no matching executable file was found for the requested command in any installed plugin/version. The process also exits with status 126 (command found but not executable/not found) after printing the message.","triggerScenarios":"Running `asdf exec <cmd>` or `asdf env <cmd>` where <cmd> does not exist in any installed version of the relevant plugin; plugin not installed for the current directory's .tool-versions; shim invoked for a tool whose executable name differs.","commonSituations":"Forgetting `asdf install` after adding a version to .tool-versions; a shim left over for a plugin that was removed; the plugin's bin/exec-path listing doesn't match the actual binary name; typo in the command name.","solutions":["Run `asdf install` in the project directory to install missing tool versions.","Verify the tool version is installed: `asdf list <plugin>` and check .tool-versions.","Recreate shims after installing or changing plugins: `asdf reshim <plugin> <version>`.","Check the executable name — the shim may exist but the binary inside the installed version has a different name; inspect the plugin's bin/ hooks."],"exampleFix":"# before\nnode --version   # shim exists but version not installed\n# after\nasdf install nodejs 20.11.0\nasdf reshim nodejs","handlingStrategy":"validation","validationCode":"asdf list <plugin> 2>/dev/null | grep -q . || asdf install\ntest -x \"$(asdf which <cmd>)\" || { echo \"<cmd> not resolvable\"; exit 1; }","typeGuard":null,"tryCatchPattern":"if ! out=$(asdf exec <cmd> 2>&1); then\n  echo \"$out\"\n  [ \"$out\" = \"executable not found\" ] && asdf install\nfi","preventionTips":["Run `asdf install` after editing .tool-versions","Run `asdf reshim` after installing or removing plugins","Verify command names with `asdf which <cmd>`","Keep .tool-versions in sync with actually installed versions"],"tags":["cli","executable","not-found","shims"],"backgroundTag":"executable-not-found","analyzedSha":"074a1722ca88d6677f228541ce06efaf4f9924d4","analyzedAt":"2026-08-30T19:56:42.972Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}