jdx/mise · error

unrecognized install

Error message

unrecognized install {s:?} in lockfile

What it means

Thrown when parsing a lockfile tool entry whose `install` field is a string other than the accepted value "source". The lockfile records how a version was installed; any other string indicates an unknown or corrupted entry.

Solutions

  1. Remove the invalid `install` key from the entry (it will be re-recorded on next install)
  2. Restore mise.lock from git
  3. Upgrade/downgrade mise to the version that wrote the lockfile, then regenerate
  4. Delete mise.lock and re-run `mise install` to regenerate

Example fix

# before
[tools.node.v22.0.0]
install = "binary"
# after
[tools.node.v22.0.0]
install = "source"
Defensive patterns

Strategy: validation

Validate before calling

grep -nE 'install\s*=\s*"' mise.lock | grep -v '"source"'

Prevention

When it happens

Trigger: mise.lock contains `install = "binary"` (or any non-"source" string) under a tool version entry — usually from a newer/older mise version writing a different enum, or manual editing.

Common situations: Hand-editing the lockfile; version skew between mise versions with different lockfile schemas; corrupted merge.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/e62f08551e1b916d. Report an issue: GitHub.

Appendix: source

Thrown at src/lockfile.rs:749

                merge_additional_artifacts(&self.additional_artifacts, &other.additional_artifacts)
            },
        }
    }
}

impl TryFrom<toml::Value> for PlatformInfo {
    type Error = Report;
    fn try_from(value: toml::Value) -> Result<Self> {
        match value {
            toml::Value::String(checksum) => Ok(PlatformInfo {
                checksum: Some(checksum),
                ..Default::default()
            }),
            toml::Value::Table(mut t) => {
                let install = match t.remove("install") {
                    Some(toml::Value::String(s)) if s == "source" => Some(s),
                    Some(toml::Value::String(s)) => {
                        bail!("unrecognized install {s:?} in lockfile")
                    }
                    _ => None,
                };
                let checksum = match t.remove("checksum") {
                    Some(toml::Value::String(s)) => Some(s),
                    _ => None,
                };
                let size = t
                    .remove("size")
                    .and_then(|v| v.as_integer())
                    .map(|i| i.try_into())
                    .transpose()?;
                let url = match t.remove("url") {
                    Some(toml::Value::String(s)) => Some(s),
                    _ => None,
                };
                let url_api = match t.remove("url_api") {
                    Some(toml::Value::String(s)) => Some(s),

View on GitHub (pinned to 533346cc37)