asdf-vm/asdf · error

no executable for tool version

Error message

no executable for tool version

What it means

When shims.FindExecutable returns shims.NoExecutableForPluginError, the installed tool version exists but does not ship the requested executable/bin entries. The CLI logs the underlying message and returns 'no executable for tool version'.

Source

Thrown at internal/cli/cli.go:1456

	if err != nil {
		logger.Printf("unable to get current directory: %s", err)
		return err
	}

	if command == "" {
		fmt.Println("usage: asdf which <command>")
		return errors.New("must provide command")
	}

	path, _, _, _, err := shims.FindExecutable(conf, command, currentDir)
	if _, ok := err.(shims.UnknownCommandError); ok {
		logger.Printf("unknown command: %s. Perhaps you have to reshim?", command)
		return errors.New("command not found")
	}

	if _, ok := err.(shims.NoExecutableForPluginError); ok {
		logger.Printf("%s", err.Error())
		return errors.New("no executable for tool version")
	}

	if err != nil {
		fmt.Printf("unexpected error: %s\n", err.Error())
		return err
	}

	fmt.Printf("%s\n", path)
	return nil
}

func uninstallCommand(logger *log.Logger, tool, version string) error {
	if tool == "" || version == "" {
		logger.Print("No plugin given")
		cli.OsExiter(1)
		return nil
	}

View on GitHub (pinned to 074a1722ca)

Solutions

  1. Check which executables the version provides: `asdf reshim` then inspect ~/.asdf/installs/<tool>/<version>/bin
  2. Verify the plugin supports the command; use a different version or plugin that provides it
  3. Update/reinstall the plugin to regenerate correct bin entries

Example fix

// before
$ asdf which yarn   # nodejs version lacks yarn binary
// after
$ asdf plugin add yarn && asdf install yarn && asdf which yarn
Defensive patterns

Strategy: type-guard

Validate before calling

if [ ! -x "$(asdf where "$TOOL")/bin/$CMD" ]; then
  echo "version does not provide $CMD" >&2
fi

Type guard

// Go caller distinguishing the underlying error type
var noExec *shims.NoExecutableForPluginError
if errors.As(err, &noExec) {
    // version exists but lacks the executable
}

Try / catch

out=$(asdf which "$CMD" 2>&1) || {
  case "$out" in
    *"no executable"*) echo "tool version lacks $CMD";;
    *) echo "$out";;
  esac
}

Prevention

When it happens

Trigger: Running `asdf which <cmd>` where the command matches a plugin name but that plugin's version has no bin entry for the command (e.g. asking for an executable a tool version doesn't provide, or plugin's bin listing is incomplete/stale).

Common situations: Plugins whose bin/ scripts were removed or renamed between versions; custom plugins with incomplete bin listing; version resolved via .tool-versions doesn't actually provide the command.

Related errors


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