jdx/mise · error

cannot upgrade {} because no configured tools were resolved

Error message

cannot upgrade {} because no configured tools were resolved

What it means

`mise lock --upgrade` upgrades a lockfile to the newest format, which requires re-resolving every configured tool request. This error is thrown when the upgrade path is taken but the resolved tool set is empty — i.e. no tools from the mise configuration could be resolved at all, so there is nothing to write into the upgraded lockfile.

Source

Thrown at src/cli/lock.rs:418

                        .lock()?;
                    let original_content = read_optional_file(&lockfile_path)?;
                    let mut lockfile = Lockfile::read(&lockfile_path)?;
                    if self.json {
                        all_changes.extend(self.compute_version_changes(
                            &lockfile,
                            &tools,
                            &lockfile_path,
                        ));
                    }
                    let pruned_tools = self.prune_stale_entries_if_needed(
                        &mut lockfile,
                        configured_selectors.as_ref(),
                    );
                    let format_changed = if self.upgrade {
                        if lockfile.tools().is_empty() {
                            self.prepare_lockfile_format(&lockfile_path, &mut lockfile)
                        } else {
                            bail!(
                                "cannot upgrade {} because no configured tools were resolved",
                                display_path(&lockfile_path)
                            );
                        }
                    } else {
                        self.report_lockfile_format(&lockfile_path, &lockfile, false)?;
                        false
                    };
                    if format_changed || !pruned_tools.is_empty() {
                        if self.upgrade {
                            staged_upgrade_writes.push(StagedUpgradeWrite {
                                path: lockfile_path.clone(),
                                original_content,
                                lockfile,
                                summary: None,
                                format_changed,
                                stale_tools: pruned_tools.clone(),
                                stale_versions: BTreeMap::new(),

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Check that your mise.toml/[tools] config actually declares tools and that each tool name is spelled correctly (`mise ls` to see resolved tools).
  2. Re-resolve tools first (`mise install`) so the lockfile has entries before running `mise lock --upgrade`.
  3. If the lockfile should be empty, delete it and regenerate with `mise lock` instead of `--upgrade`.
  4. If resolution failures are the cause, fix the underlying errors printed during resolution (bad registry names, network failures, unsupported versions).

Example fix

// before (mise.toml missing tools section, lockfile empty)
[env]
FOO = "1"

// after
[tools]
node = "22"
python = "3.12"
Defensive patterns

Strategy: validation

Validate before calling

# before running: mise lock --upgrade
[ -s mise.lock ] && mise ls --tools | grep -q . && echo ok || echo "no resolved tools — fix config first"

Prevention

When it happens

Trigger: Run `mise lock --upgrade` on a lockfile whose configured tool selectors (from mise.toml/.tool-versions) all fail to resolve — e.g. the config has no [tools] entries, or every selector fails resolution so `configured_selectors` yields an empty resolved tool list, while `lockfile.tools()` is empty.

Common situations: Running `--upgrade` against a lockfile that was generated from a config whose tools section was removed or renamed; typos in tool names so nothing resolves; a mise.toml with only env/task config and no tools at all.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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