JanDeDobbeleer/oh-my-posh · warning
NO VERSION
Error message
NO VERSION
What it means
The language segment's runCommand() returns the constant noVersion ('NO VERSION') when the configured executable is not found on PATH (only for commands without a custom getVersion function). This signals that the tool isn't installed or isn't reachable, so no version can be displayed.
Source
Thrown at src/segments/language.go:434
l.Executable = command.executable
duration := l.options.String(options.CacheDuration, string(cache.NONE))
cache.Device.Set(cacheKey, l.Version, cache.Duration(duration))
return nil
}
if lastError != nil {
return lastError
}
return errors.New(l.options.String(MissingCommandText, ""))
}
func (l *Language) runCommand(command *cmd) (string, error) {
if command.getVersion == nil {
if !l.env.HasCommand(command.executable) {
return "", errors.New(noVersion)
}
cacheKey, cacheable := l.versionCacheKey(command)
if cacheable {
if cached, found := cache.Device.Get[string](cacheKey); found {
log.Debugf("using cached version output for %s", command.executable)
return cached, nil
}
}
versionStr, err := l.env.RunCommandWithEnv(command.executable, command.envs, command.args...)
if exitErr, ok := err.(*runtime.CommandError); ok {
l.exitCode = exitErr.ExitCode
return "", fmt.Errorf("err executing %s with %v", command.executable, command.args)
}
// Success only: a failed run (a non-CommandError err, or one theView on GitHub (pinned to 0976794618)
Solutions
- Install the language runtime or make sure its binary is on the PATH used by the prompt shell.
- Initialize your version manager (e.g. add nvm/pyenv/asdf hooks) in the shell's profile so the executable resolves.
- Set the segment's `missing_command_text` option to control the fallback display, or disable the segment when the tool is absent.
- Use a different `executable` option if the tool is available under another name.
Defensive patterns
Strategy: validation
Validate before calling
command -v node >/dev/null 2>&1 || echo 'node not on PATH'
Prevention
- Ensure version-manager init (nvm/pyenv/asdf) runs in the prompt's shell profile.
- Install the runtime before enabling its segment in your theme.
- Set `missing_command_text` so the segment degrades gracefully.
- Compare PATH in the prompt shell (`oh-my-posh debug`) with your interactive shell.
When it happens
Trigger: setVersion iterates over display commands and calls runCommand with an executable that l.env.HasCommand cannot find on PATH; also exercised in tests with mocked environments lacking the command.
Common situations: Segment enabled in theme but the language runtime isn't installed; version managers (nvm, pyenv, asdf) not initialized in the prompt's non-interactive shell so the binary isn't on PATH; Windows vs WSL path differences.
Related errors
- no match at root level
- cannot parse version string
- no version found
- no python executable found
- err parsing info from %s with %s
AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31).
Data as JSON: /api/errors/45f0d812e59dfc52.
Report an issue: GitHub.