{"record":{"id":"acfec3b2f5667883","repo":"asdf-vm/asdf","slug":"version-not-installed","errorCode":null,"errorMessage":"Version not installed","messagePattern":"Version not installed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cli/cli.go","lineNumber":1556,"sourceCode":"\n\t\tif found && len(versions.Versions) > 0 {\n\t\t\tversionStruct := toolversions.Version{Type: \"version\", Value: versions.Versions[0]}\n\t\t\tif installs.IsInstalled(conf, plugin, versionStruct) {\n\t\t\t\tinstallPath := installs.InstallPath(conf, plugin, versionStruct)\n\t\t\t\tfmt.Printf(\"%s\", installPath)\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\n\t\t// not found\n\t\tmsg := fmt.Sprintf(\"No version is set for %s; please run `asdf set [options] %s <version>`\", tool, tool)\n\t\tlogger.Print(msg)\n\t\treturn errors.New(msg)\n\t}\n\n\tif !installs.IsInstalled(conf, plugin, version) {\n\t\tlogger.Printf(\"Version not installed\")\n\t\treturn errors.New(\"Version not installed\")\n\t}\n\n\tinstallPath := installs.InstallPath(conf, plugin, version)\n\tfmt.Printf(\"%s\", installPath)\n\n\treturn nil\n}\n\nfunc loadPlugin(logger *log.Logger, conf config.Config, pluginName string) (plugins.Plugin, error) {\n\tplugin := plugins.New(conf, pluginName)\n\terr := plugin.Exists()\n\tif err != nil {\n\t\tlogger.Printf(\"No such plugin: %s\", pluginName)\n\t\treturn plugin, err\n\t}\n\n\treturn plugin, err\n}","sourceCodeStart":1538,"sourceCodeEnd":1574,"githubUrl":"https://github.com/asdf-vm/asdf/blob/074a1722ca88d6677f228541ce06efaf4f9924d4/internal/cli/cli.go#L1538-L1574","documentation":"A version is selected for the tool but `installs.IsInstalled` reports it is not actually present under ~/.asdf/installs. The CLI refuses to print an install path for a non-existent install.","triggerScenarios":"Running `asdf where <tool>` when the resolved version (from .tool-versions or defaults) was never installed, or the install directory was deleted/corrupted, or the version string differs slightly from the installed one (e.g. '20.12' vs '20.12.0').","commonSituations":"Cloning a repo with .tool-versions listing versions you haven't installed; cleaning ~/.asdf/installs manually; version bump in .tool-versions without running `asdf install`.","solutions":["Install the version: `asdf install <tool> <version>`","Verify the exact installed version with `asdf list <tool>` and align .tool-versions with it","Do not manually delete directories under ~/.asdf/installs; use `asdf uninstall` to keep state consistent"],"exampleFix":"// before (.tool-versions: nodejs 22.0.0, not installed)\n$ asdf where nodejs\n// after\n$ asdf install nodejs 22.0.0 && asdf where nodejs","handlingStrategy":"validation","validationCode":"VER=$(awk -v t=\"$TOOL\" '$1==t{print $2; exit}' .tool-versions 2>/dev/null)\nif [ -n \"$VER\" ] && [ ! -d \"$HOME/.asdf/installs/$TOOL/$VER\" ]; then\n  echo \"$TOOL $VER not installed; run: asdf install $TOOL $VER\" >&2\nfi","typeGuard":null,"tryCatchPattern":"out=$(asdf where \"$TOOL\" 2>&1) || {\n  case \"$out\" in\n    *\"not installed\"*) asdf install \"$TOOL\";;\n    *) echo \"$out\" >&2;;\n  esac\n}","preventionTips":["Run `asdf install` (no args) to install every version in .tool-versions after cloning","Never delete directories under ~/.asdf/installs manually; use `asdf uninstall`","Use exact full version strings to avoid partial-version mismatches"],"tags":["cli","install-state","where"],"backgroundTag":"version-not-installed","analyzedSha":"074a1722ca88d6677f228541ce06efaf4f9924d4","analyzedAt":"2026-08-30T19:56:42.972Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}