asdf-vm/asdf · error

No compatible versions available (%s %s)

Error message

No compatible versions available (%s %s)

What it means

latestCommand resolves the latest version for a tool, optionally filtered by a pattern. If resolution yields an empty latest string (no version matched the pattern or the plugin's latest-listing produced nothing), latestForPlugin returns this error naming the tool and pattern.

Source

Thrown at internal/cli/cli.go:1592

}

func reshimToolVersion(conf config.Config, plugin plugins.Plugin, versionStr string, out io.Writer, errOut io.Writer) error {
	version := toolversions.Parse(versionStr)

	return shims.GenerateForVersion(conf, plugin, version, out, errOut)
}

func latestForPlugin(conf config.Config, toolName, pattern string, showStatus bool, errOut io.Writer) error {
	// show single plugin
	plugin := plugins.New(conf, toolName)
	latest, err := versions.Latest(plugin, pattern, errOut)
	if err != nil && err.Error() != "no latest version found" {
		fmt.Printf("unable to load latest version: %s\n", err)
		return err
	}

	if latest == "" {
		err := fmt.Errorf("No compatible versions available (%s %s)", toolName, pattern)
		fmt.Println(err.Error())
		return err
	}

	if showStatus {
		installed := installs.IsInstalled(conf, plugin, toolversions.Version{Type: "version", Value: latest})
		fmt.Printf("%s\t%s\t%s\n", plugin.Name, latest, installedStatus(installed))
	} else {
		fmt.Printf("%s\n", latest)
	}
	return nil
}

func installedStatus(installed bool) string {
	if installed {
		return "installed"
	}
	return "missing"

View on GitHub (pinned to 074a1722ca)

Solutions

  1. Check the plugin name with `asdf plugin list` and correct typos.
  2. Widen or correct the version pattern (e.g. `asdf latest nodejs 20`).
  3. Verify network access / the plugin repo URL; re-add the plugin if its repo is broken.
  4. Run `asdf plugin update <plugin>` to refresh the plugin before retrying.

Example fix

# before
asdf latest nodejs 999   # no match
# after
asdf latest nodejs 20    # resolves latest 20.x
Defensive patterns

Strategy: validation

Validate before calling

asdf plugin list | grep -qx "$PLUGIN" || { echo "plugin $PLUGIN not installed"; exit 1; }
asdf latest "$PLUGIN" || true

Try / catch

if ! latest=$(asdf latest "$PLUGIN" "$PATTERN" 2>&1); then
  echo "$latest"; exit 1
fi

Prevention

When it happens

Trigger: `asdf latest <plugin>` where the plugin reports no versions (bad/broken repo, no network for git-based listing); `asdf latest <plugin> <pattern>` where no version matches the pattern; plugin's list-all callback returns nothing usable.

Common situations: Typo in the plugin name so an unrelated/missing plugin yields no versions; an overly restrictive version pattern like `asdf latest nodejs 999` matching nothing; offline environment preventing the plugin from listing remote versions.

Related errors


AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30). Data as JSON: /api/errors/2d4d93303c8f070a. Report an issue: GitHub.