jdx/mise · error

has no uv dependency graph; run `mise lock

Error message

{} has no uv dependency graph; run `mise lock`

What it means

prepare_install_version refuses to install a pipx tool whose lockfile declares a uv dependency graph when the graph is missing. Locking with uv records the full resolved dependency set; replaying an install from that lock requires the graph, so mise bails and tells you to run `mise lock` to (re)generate it.

Solutions

  1. Run `mise lock` to regenerate the uv dependency graph for the tool
  2. Reinstall after locking: `mise install`
  3. If you don't need dependency locking, remove the lock entry / related lock options so install falls back to version-only resolution
Defensive patterns

Strategy: validation

Validate before calling

// before installing a locked pipx tool, ensure the lock has the uv graph
const entry = lock.tools["pipx:ruff"];
if (entry?.hasUvGraph && !entry.graph) throw new Error("run `mise lock` first");

Try / catch

try { await $`mise install pipx:ruff` } catch (e) {
  if (/run `mise lock`/.test(e.message)) await $`mise lock`;
  else throw e;
}

Prevention

When it happens

Trigger: Running `mise install` (ctx.locked = true) for a pipx tool that has a uv dependency graph recorded in mise.lock, while uvx_args or pipx_args are NOT configured (the skip path above didn't apply) and the graph is absent/unavailable.

Common situations: Deleting or regenerating mise.lock without re-running `mise lock`; cloning a repo and installing from a lockfile whose dependency graph entries were stripped; switching machines where lock content was trimmed.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

Thrown at src/backend/pipx.rs:459

                crate::lockfile::version_for_request(&ctx.config, &tv.request)?
            } else {
                None
            };
            let graph_required = revision.is_some_and(|v| v >= 2)
                || (!tv.resolved_from_lockfile() && Settings::get().lockfile_creation_enabled());
            if graph_required {
                if !self.uv_lock_options_supported(&tv) {
                    if ctx.locked {
                        self.validate_lock_options(&tv)?;
                    }
                    warn!(
                        "{} dependency graph skipped because uvx_args or pipx_args are configured; installing with version-only resolution",
                        self.ba.short
                    );
                    return Ok(tv);
                }
                if ctx.locked {
                    bail!(
                        "{} has no uv dependency graph; run `mise lock`",
                        self.ba.short
                    );
                }
                if self
                    .spawnable_dependency(&ctx.config, Some(&ctx.ts), "uv")
                    .await
                    .is_none()
                {
                    return Ok(tv);
                }
                if let Some(version) = tv.uv_install_path_version().map(str::to_owned) {
                    tv.version = version;
                }
                match self.resolve_uv_lock(&ctx.config, &tv).await {
                    Ok(lock) => tv.uv_lock = Some(lock),
                    Err(error) => {
                        warn!(

View on GitHub (pinned to 533346cc37)