jdx/mise · error

lockfile contains multiple resolutions for {short}@{specifie

Error message

lockfile contains multiple resolutions for {short}@{specifier} with the same options

What it means

During lockfile resolution lookup, mise filters lockfile entries for short@specifier matching the request options. If more than one entry matches with identical options, the resolution is ambiguous and mise refuses to pick arbitrarily, bailing with this message.

Source

Thrown at src/lockfile.rs:3664

        }
    };

    if let Some(tools) = lockfile.tools.get(short) {
        if lockfile.uses_request_bindings() {
            let matching = tools
                .iter()
                .filter(|tool| {
                    tool.specifiers.contains(specifier) && &tool.options == request_options
                })
                .collect_vec();
            match matching.as_slice() {
                [] => {}
                [found] => {
                    trace!("[{short}@{specifier}] found {} in lockfile", found.version);
                    return Ok(Some((*found).clone()));
                }
                _ => {
                    bail!(
                        "lockfile contains multiple resolutions for {short}@{specifier} with the same options"
                    )
                }
            }

            if legacy_options_fallback && !request_options.is_empty() {
                let legacy = tools
                    .iter()
                    .filter(|tool| tool.specifiers.contains(specifier) && tool.options.is_empty())
                    .collect_vec();
                match legacy.as_slice() {
                    [] => {}
                    [found] => {
                        trace!(
                            "[{short}@{specifier}] found {} in lockfile without options, keeping the version pin and dropping its artifact data",
                            found.version
                        );
                        return Ok(Some(lockfile_tool_with_request_options(

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Remove the duplicate [[tools.<short>]] entries in mise.lock, keeping exactly one per (specifier, options) combination
  2. Regenerate the lockfile: delete it and run `mise lock` / `mise install` to rebuild clean entries
  3. Restore mise.lock from a known-good commit if the corruption came from a merge

Example fix

# before (mise.lock): two identical entries
[[tools.node]]
version = "20.0.0"
[[tools.node]]
version = "20.0.0"
# after
[[tools.node]]
version = "20.0.0"
Defensive patterns

Strategy: validation

Validate before calling

// Detect duplicate (specifier, options) tool entries before resolution
fn has_duplicates(entries: &[TomlToolEntry]) -> bool {
    let mut seen = std::collections::HashSet::new();
    entries.iter().any(|e| !seen.insert((e.specifier.clone(), e.options.clone())))
}

Prevention

When it happens

Trigger: Looking up a resolution in mise.lock where the entries array contains two or more LockfileTool entries for the same short name + specifier with the same options hash. Produced by corrupted lockfiles, bad merges that duplicated entries, or concurrent writes.

Common situations: A git merge duplicated [[tools.x]] entries; a crash or race during `mise lock` left duplicate rows; hand-editing copied an entry without removing the old one.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


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