asdf-vm/asdf · error
Version not installed
Error message
Version not installed
What it means
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.
Source
Thrown at internal/cli/cli.go:1556
if found && len(versions.Versions) > 0 {
versionStruct := toolversions.Version{Type: "version", Value: versions.Versions[0]}
if installs.IsInstalled(conf, plugin, versionStruct) {
installPath := installs.InstallPath(conf, plugin, versionStruct)
fmt.Printf("%s", installPath)
return nil
}
}
// not found
msg := fmt.Sprintf("No version is set for %s; please run `asdf set [options] %s <version>`", tool, tool)
logger.Print(msg)
return errors.New(msg)
}
if !installs.IsInstalled(conf, plugin, version) {
logger.Printf("Version not installed")
return errors.New("Version not installed")
}
installPath := installs.InstallPath(conf, plugin, version)
fmt.Printf("%s", installPath)
return nil
}
func loadPlugin(logger *log.Logger, conf config.Config, pluginName string) (plugins.Plugin, error) {
plugin := plugins.New(conf, pluginName)
err := plugin.Exists()
if err != nil {
logger.Printf("No such plugin: %s", pluginName)
return plugin, err
}
return plugin, err
}View on GitHub (pinned to 074a1722ca)
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
Example fix
// before (.tool-versions: nodejs 22.0.0, not installed) $ asdf where nodejs // after $ asdf install nodejs 22.0.0 && asdf where nodejs
Defensive patterns
Strategy: validation
Validate before calling
VER=$(awk -v t="$TOOL" '$1==t{print $2; exit}' .tool-versions 2>/dev/null)
if [ -n "$VER" ] && [ ! -d "$HOME/.asdf/installs/$TOOL/$VER" ]; then
echo "$TOOL $VER not installed; run: asdf install $TOOL $VER" >&2
fi Try / catch
out=$(asdf where "$TOOL" 2>&1) || {
case "$out" in
*"not installed"*) asdf install "$TOOL";;
*) echo "$out" >&2;;
esac
} Prevention
- 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
When it happens
Trigger: 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').
Common situations: 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`.
Related errors
- System version is selected
- No version is set for %s; please run `asdf set [options] %s
- command removed
- bad shell name
- no plugin name specified
AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30).
Data as JSON: /api/errors/acfec3b2f5667883.
Report an issue: GitHub.