{"record":{"id":"8eaea8de1931841c","repo":"asdf-vm/asdf","slug":"no-version-is-set-for-s-please-run-asdf-set-op","errorCode":null,"errorMessage":"No version is set for %s; please run `asdf set [options] %s <version>`","messagePattern":"No version is set for (.+?); please run `asdf set \\[options\\] (.+?) <version>`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cli/cli.go","lineNumber":1551,"sourceCode":"\t\tversions, found, err := resolve.Version(conf, plugin, currentDir)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"err %#+v\\n\", err)\n\t\t\treturn err\n\t\t}\n\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)","sourceCodeStart":1533,"sourceCodeEnd":1569,"githubUrl":"https://github.com/asdf-vm/asdf/blob/074a1722ca88d6677f228541ce06efaf4f9924d4/internal/cli/cli.go#L1533-L1569","documentation":"`asdf where <tool>` could not resolve any version for the tool in the current directory or its config chain, so there is no install path to print. The message tells the user to run `asdf set` to pin a version.","triggerScenarios":"Running `asdf where <tool>` where resolve finds no version in .tool-versions (current or parent dirs) and no default version is configured.","commonSituations":"Fresh clones missing .tool-versions; tool name typo in .tool-versions; no global default set in ~/.tool-versions or asdf config after a fresh install.","solutions":["Pin a version in the current directory: `asdf set <tool> <version>` or add `<tool> <version>` to .tool-versions","Set a default: add the tool+version to ~/.config/asdf/default (or ~/.tool-versions) so subdirectories resolve","Confirm the tool name spelling matches the installed plugin name (`asdf plugin list`)"],"exampleFix":"// before (.tool-versions missing nodejs)\npython 3.12.1\n// after\npython 3.12.1\nnodejs 20.12.0","handlingStrategy":"validation","validationCode":"if ! grep -qE \"^$TOOL[[:space:]]+\" .tool-versions 2>/dev/null \\\n   && ! grep -qE \"^$TOOL[[:space:]]+\" ~/.config/asdf/default 2>/dev/null; then\n  echo \"no version set for $TOOL; run asdf set $TOOL <version>\" >&2\nfi","typeGuard":null,"tryCatchPattern":"out=$(asdf where \"$TOOL\" 2>&1) || {\n  case \"$out\" in\n    *\"No version is set\"*) asdf set \"$TOOL\" \"$DEFAULT_VER\";;\n    *) echo \"$out\" >&2;;\n  esac\n}","preventionTips":["Commit a .tool-versions to every project repo","Set a global default for tools you use everywhere","Check tool-name spelling against `asdf plugin list`"],"tags":["cli","version-resolution","where"],"backgroundTag":"no-version-set","analyzedSha":"074a1722ca88d6677f228541ce06efaf4f9924d4","analyzedAt":"2026-08-30T19:56:42.972Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}