jdx/mise · error

failed to resolve configured install dependency '{}' for '{}

Error message

failed to resolve configured install dependency '{}' for '{}' while offline

What it means

While building the offline-resolved dependency context for a tool install (InstallDependencyContext::resolve), a declared install dependency's version could not be resolved with offline=true and the request itself is unresolvable offline (a prefix/sub request, or 'latest'/rolling channel not fixed by the lockfile). mise bails rather than guessing a version without network access.

Source

Thrown at src/install_context.rs:149

                        "failed to resolve configured install dependency '{}' for '{}'",
                        dependency, request
                    )
                })?;
        }
        for (backend, dependency) in toolset.list_current_versions() {
            if !backend.is_version_installed(config, &dependency, true) {
                let unresolved = !dependency.resolved_from_lockfile()
                    && match &dependency.request {
                        ToolRequest::Prefix { .. } | ToolRequest::Sub { .. } => true,
                        ToolRequest::Version { version, .. } => {
                            version == "latest" || backend.is_rolling_channel(version)
                        }
                        ToolRequest::Ref { .. }
                        | ToolRequest::Path { .. }
                        | ToolRequest::System { .. } => false,
                    };
                if unresolved {
                    bail!(
                        "failed to resolve configured install dependency '{}' for '{}' while offline",
                        dependency.request,
                        request
                    );
                }
                bail!(
                    "tool '{}' requires configured install dependency '{}', but its selected version is not installed\n\
                     hint: Run `mise install {}` before installing '{}'. Remove the dependency from configuration to allow the install hook to rely on system PATH instead.",
                    request,
                    dependency.request,
                    dependency.request,
                    request,
                );
            }
        }
        let paths = toolset.list_paths_strict(config, request).await?;
        let context = Self {
            declarations,

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Run the install once online so versions resolve and are written to mise.lock, then retry offline.
  2. Pin the dependency to a concrete version in config (e.g. node = '22.11.0') instead of a prefix/latest/rolling channel.
  3. Pre-install the dependency explicitly (`mise install <dependency>@<version>`) before the offline install.
  4. Disable offline mode (unset MISE_OFFLINE) if network is actually available.

Example fix

// before (.mise.toml)
[tools]
npm = "latest"
// after: pin concrete versions so offline resolution works
[tools]
npm = "10.9.0"
Defensive patterns

Strategy: validation

Validate before calling

# before offline install, ensure dependencies are pinned and present
mise ls <dependency> || mise install <dependency>@<exact-version>
mise lock  # writes concrete versions so offline resolution can succeed

Try / catch

if ! mise install "$tool"; then
  echo "offline dependency resolution failed; retry online to populate mise.lock" >&2
  MISE_OFFLINE=0 mise install "$tool" || exit 1
  MISE_OFFLINE=1 mise install "$tool"
fi

Prevention

When it happens

Trigger: Running `mise install <tool>` (or any install that resolves configured install dependencies) while offline (MISE_OFFLINE=1 or no network) when the tool declares a dependency whose request is a prefix like 'node@22', a sub-request, 'latest', or a rolling channel (e.g. 'lts'), the dependency is not installed, and the lockfile did not pin it.

Common situations: CI or air-gapped machines with MISE_OFFLINE=1 installing a tool that depends on another rolling/prefix-versioned tool; missing lockfile entry for the dependency.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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