jdx/mise · error
unrecognized version
Error message
unrecognized {preset} version: {version} What it means
major() parses the `--version` output of a preset's binary to extract the major version; it first strips a `v=` (or similar) prefix from the output, then requires the major segment to be non-empty and all digits. If the version string does not match, the output is considered unrecognized for that preset.
Solutions
- Ensure the real preset binary (not a wrapper) is on PATH and prints a standard version like 'x.y.z' or 'v=x.y.z'
- Fix PATH so mise resolves the official binary
- Check the binary runs correctly outside mise (`<binary> --version`)
Example fix
// shell before: postgres --version prints "custom build" // after: resolve official binary so output is e.g. "postgres (PostgreSQL) 16.3" PATH=/usr/lib/postgresql/16/bin:$PATH mise daemon start
Defensive patterns
Strategy: validation
Validate before calling
# verify the binary reports a parseable version first <binary> --version | grep -Eo '[0-9]+\.[0-9]+' || echo 'unparseable version output'
Try / catch
catch (e) { if (/unrecognized .* version/.test(e.message)) { checkBinaryOnPath(); } } Prevention
- Keep wrappers/shims out of PATH for daemon binaries
- Test `<binary> --version` output after changing tool versions
- Use official tool builds
When it happens
Trigger: Running a preset binary's --version whose stdout lacks a parseable version (builds without version info, custom/patched binaries printing unexpected text), called during daemon initialize.
Common situations: A PATH-shimmed or wrapper postgres binary printing a custom banner; a very old or nonstandard build whose version line format differs; locale-modified output.
Related errors
- daemon presets are not supported on Windows yet
- unknown option
- another daemon profile is active for
- daemon presets are not supported on Windows yet
- daemon requests @ , conflicting with another daemon; use…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3f5a78961f7cece9.
Report an issue: GitHub.
Appendix: source
Thrown at src/daemons/presets.rs:171
preset: Some(preset_name.into()),
tool: Some((tool, version.into())),
exports,
})
}
/// Database compatibility is preset-specific; tool request strings remain opaque.
fn major(preset: &str, output: &str) -> Result<String> {
let version = match preset {
"postgres" => output.trim().strip_prefix("postgres (PostgreSQL) "),
"redis" => output
.split_whitespace()
.find_map(|part| part.strip_prefix("v=")),
_ => None,
}
.ok_or_else(|| eyre::eyre!("unrecognized {preset} version output: {output}"))?;
let major = version.split('.').next().unwrap_or_default();
if major.is_empty() || !major.chars().all(|c| c.is_ascii_digit()) {
bail!("unrecognized {preset} version: {version}");
}
Ok(major.into())
}
pub(crate) fn initialize(preset_name: &str, data: &Path, database: &str) -> Result<()> {
crate::config::Settings::get().ensure_experimental("daemon presets")?;
crate::config::Settings::ensure_not_safe("initializing daemon data")?;
if cfg!(windows) {
bail!("daemon presets are not supported on Windows yet");
}
let preset = preset(preset_name)?;
let parent = data
.parent()
.ok_or_else(|| eyre::eyre!("daemon data must have a parent directory"))?;
std::fs::create_dir_all(parent)?;
let _lock = crate::lock_file::LockFile::new(data).lock()?;
let output = Command::new(&preset.binary).arg("--version").output()?;
if !output.status.success() {View on GitHub (pinned to 533346cc37)