asdf-vm/asdf · error
no such plugin: %s
Error message
no such plugin: %s
What it means
Plugin.Update calls p.Exists() first; if the plugin's directory does not exist in the data dir, it returns 'no such plugin: %s'. Updating requires the plugin to already be installed — this error signals you tried to update a plugin asdf does not know about.
Source
Thrown at internal/plugins/plugins.go:270
if name != "" {
commandName = fmt.Sprintf("command-%s", name)
}
path := filepath.Join(p.Dir, "lib", "commands", commandName)
_, err := os.Stat(path)
if errors.Is(err, os.ErrNotExist) {
return "", NoCommandError{command: name, plugin: p.Name}
}
return path, nil
}
// Update a plugin to a specific ref, or if no ref provided update to latest
func (p Plugin) Update(conf config.Config, ref string, out, errout io.Writer) (string, error) {
err := p.Exists()
if err != nil {
return "", fmt.Errorf("no such plugin: %s", p.Name)
}
repo := git.NewRepo(p.Dir)
hook.Run(conf, "pre_asdf_plugin_update", []string{p.Name})
hook.Run(conf, fmt.Sprintf("pre_asdf_plugin_update_%s", p.Name), []string{p.Name})
newRef, oldSHA, newSHA, err := repo.Update(ref)
if err != nil {
return newRef, err
}
env := map[string]string{
"ASDF_DATA_DIR": conf.DataDir,
"ASDF_PLUGIN_PATH": p.Dir,
"ASDF_PLUGIN_PREV_REF": oldSHA,
"ASDF_PLUGIN_POST_REF": newSHA,
}View on GitHub (pinned to 074a1722ca)
Solutions
- List installed plugins (`asdf plugin list`) and fix the name.
- Add the plugin first: asdf plugin add <name> [<git-url>].
- Verify ASDF_DATA_DIR/home matches the environment where the plugin was added.
- Re-add the plugin if its directory was deleted manually.
Example fix
// before asdf plugin update nodjs # typo # Error: no such plugin: nodjs // after asdf plugin list asdf plugin update nodejs
Defensive patterns
Strategy: validation
Validate before calling
exists, err := plugins.PluginExists(conf.DataDir, pluginName)
if err != nil || !exists {
// add it first instead of updating
return plugins.Add(conf, pluginName, repoURL)
} Try / catch
ref, err := plugin.Update(conf, "", out, errout)
if err != nil && strings.HasPrefix(err.Error(), "no such plugin") {
log.Printf("%s not installed; run: asdf plugin add %s", pluginName, pluginName)
} Prevention
- Run `asdf plugin list` to confirm the exact plugin name before updating.
- Ensure ASDF_DATA_DIR is consistent across your shells and scripts.
- Add plugins before scripting updates against them.
- Re-add plugins whose directories were removed manually.
When it happens
Trigger: Calling Update (or `asdf plugin update <name>`) when: the plugin name is misspelled; the plugin was never added (`asdf plugin add` not run); the plugin was removed earlier; the ASDF_DATA_DIR differs from the one used to add the plugin, so the directory lookup misses.
Common situations: Typo on the CLI; scripts assuming a plugin exists; switching ASDF_DATA_DIR or running as a different user whose home differs; plugin dir removed manually while asdf's metadata still referenced it elsewhere.
Related errors
- unable to resolve plugin new Git HEAD: %w
- plugin %s not found in repository
- unable to check if plugin already exists: %w
AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30).
Data as JSON: /api/errors/e7f5862c1ceb7a81.
Report an issue: GitHub.