{"record":{"id":"73bdf50276caeebd","repo":"jdx/mise","slug":"failed-to-resolve-configured-install-dependency","errorCode":null,"errorMessage":"failed to resolve configured install dependency '{}' for '{}' while offline","messagePattern":"failed to resolve configured install dependency '(.+?)' for '(.+?)' while offline","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/install_context.rs","lineNumber":149,"sourceCode":"                        \"failed to resolve configured install dependency '{}' for '{}'\",\n                        dependency, request\n                    )\n                })?;\n        }\n        for (backend, dependency) in toolset.list_current_versions() {\n            if !backend.is_version_installed(config, &dependency, true) {\n                let unresolved = !dependency.resolved_from_lockfile()\n                    && match &dependency.request {\n                        ToolRequest::Prefix { .. } | ToolRequest::Sub { .. } => true,\n                        ToolRequest::Version { version, .. } => {\n                            version == \"latest\" || backend.is_rolling_channel(version)\n                        }\n                        ToolRequest::Ref { .. }\n                        | ToolRequest::Path { .. }\n                        | ToolRequest::System { .. } => false,\n                    };\n                if unresolved {\n                    bail!(\n                        \"failed to resolve configured install dependency '{}' for '{}' while offline\",\n                        dependency.request,\n                        request\n                    );\n                }\n                bail!(\n                    \"tool '{}' requires configured install dependency '{}', but its selected version is not installed\\n\\\n                     hint: Run `mise install {}` before installing '{}'. Remove the dependency from configuration to allow the install hook to rely on system PATH instead.\",\n                    request,\n                    dependency.request,\n                    dependency.request,\n                    request,\n                );\n            }\n        }\n        let paths = toolset.list_paths_strict(config, request).await?;\n        let context = Self {\n            declarations,","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/install_context.rs#L131-L167","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Run the install once online so versions resolve and are written to mise.lock, then retry offline.","Pin the dependency to a concrete version in config (e.g. node = '22.11.0') instead of a prefix/latest/rolling channel.","Pre-install the dependency explicitly (`mise install <dependency>@<version>`) before the offline install.","Disable offline mode (unset MISE_OFFLINE) if network is actually available."],"exampleFix":"// before (.mise.toml)\n[tools]\nnpm = \"latest\"\n// after: pin concrete versions so offline resolution works\n[tools]\nnpm = \"10.9.0\"","handlingStrategy":"validation","validationCode":"# before offline install, ensure dependencies are pinned and present\nmise ls <dependency> || mise install <dependency>@<exact-version>\nmise lock  # writes concrete versions so offline resolution can succeed","typeGuard":null,"tryCatchPattern":"if ! mise install \"$tool\"; then\n  echo \"offline dependency resolution failed; retry online to populate mise.lock\" >&2\n  MISE_OFFLINE=0 mise install \"$tool\" || exit 1\n  MISE_OFFLINE=1 mise install \"$tool\"\nfi","preventionTips":["Pin all tool versions (and their install dependencies) to concrete versions in config.","Run `mise lock` while online before air-gapped/offline CI runs.","Pre-install declared dependencies before switching to offline mode."],"tags":["offline","install","dependency","version-resolution"],"backgroundTag":"missing-dependency","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}