jdx/mise · error

No lockfile URL found for

Error message

No lockfile URL found for {} on platform {} (--locked mode)
hint: Run `mise lock` to generate lockfile URLs, or disable locked mode

What it means

In --locked mode, a backend that supports URL locking must have a pinned URL recorded in the lockfile for the exact platform being installed (tv.lock_platforms[platform_key].url). When the lockfile has an entry structure but no URL for this platform, mise refuses to install unpinned.

Solutions

  1. Run `mise lock` on the target platform to generate lockfile URLs
  2. Run `mise lock` for all relevant platforms (e.g. in CI matrix) before enabling --locked
  3. Disable --locked mode for this install

Example fix

// before
mise install --locked go@1.22   # fails on linux-arm64: no locked URL
// after
mise lock go@1.22 && mise install --locked go@1.22
Defensive patterns

Strategy: validation

Validate before calling

// bash: ensure a locked URL exists for the current platform before --locked install
grep -A2 "$(mise exec -- uname -m)" mise.lock | grep -q 'url =' || { echo 'run: mise lock'; exit 1; }

Try / catch

// bash
mise install --locked tool || case $? in
  *) mise lock tool && mise install --locked tool ;; esac

Prevention

When it happens

Trigger: mise install --locked for a tool version whose lock_platforms entry for get_platform_key() has no url — lockfile generated before URL locking existed, on a different platform, or from an older mise version.

Common situations: Upgrading mise and adopting --locked on an old mise.lock; locking on macOS then installing on Linux; tool version re-resolved to one not previously locked.

Related errors


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

Appendix: source

Thrown at src/backend/mod.rs:3381

        // Exempt tool stubs from lockfile requirements since they are ephemeral
        // Also exempt backends that don't support URL locking (e.g., Rust uses rustup)
        // This must run before the dry-run check so that --locked --dry-run still validates
        let settings = Settings::get();
        if ctx.locked && settings.lockfile == Some(false) {
            bail!(
                "locked mode requires lockfile to be enabled\n\
                hint: Remove `lockfile = false` or set `lockfile = true`, or disable locked mode"
            );
        }
        if ctx.locked && !tv.request.source().is_tool_stub() && self.supports_lockfile_url() {
            let platform_key = self.get_platform_key();
            let has_lockfile_url = tv
                .lock_platforms
                .get(&platform_key)
                .and_then(|p| p.url.as_ref())
                .is_some();
            if !has_lockfile_url {
                bail!(
                    "No lockfile URL found for {} on platform {} (--locked mode)\n\
                    hint: Run `mise lock` to generate lockfile URLs, or disable locked mode",
                    tv.style(),
                    platform_key
                );
            }
        }

        // A rolling release (e.g. a `nightly` tag) keeps the same version string,
        // so its install dir already existing does NOT mean it's up-to-date.
        let rolling_reinstall = !ctx.force
            && self.is_version_installed(&ctx.config, &tv, true)
            && self.is_rolling_version_outdated(&ctx.config, &tv).await;

        // Handle dry-run mode early to avoid plugin installation
        if ctx.dry_run {
            use crate::ui::progress_report::ProgressIcon;
            let satisfied = !ctx.force

View on GitHub (pinned to 533346cc37)