{"record":{"id":"681b3b4e9c273ee3","repo":"jdx/mise","slug":"is-not-in-the-lockfile-hint-hint","errorCode":null,"errorMessage":"{}@{} is not in the lockfile\nhint: {hint}","messagePattern":"(.+?)@(.+?) is not in the lockfile\nhint: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/toolset/tool_version.rs","lineNumber":404,"sourceCode":"                request.lockfile_resolve_with_prefix(config, lock_query, lock_prefix_boundary)?\n        {\n            return Ok(Self::from_lockfile(request.clone(), lt));\n        }\n        let settings = Settings::get();\n        let tool_config_locked = config.tool_config_locked(request.source());\n        let invocation_locked = config.invocation_locked_for(request.source(), settings.locked);\n        if (invocation_locked || tool_config_locked)\n            && opts.use_locked_version\n            && settings.lockfile_enabled()\n            && !has_linked_version(request.ba())\n            && request.source().path().is_some()\n        {\n            let hint = if tool_config_locked && !invocation_locked {\n                \"Run `mise lock` to update the lockfile, or disable `tool_config.locked`\"\n            } else {\n                \"Run `mise install` without --locked to update the lockfile\"\n            };\n            bail!(\n                \"{}@{} is not in the lockfile\\nhint: {hint}\",\n                request.ba().short,\n                request.version()\n            );\n        }\n\n        match v.split_once(':') {\n            Some((ref_type @ (\"ref\" | \"tag\" | \"branch\" | \"rev\"), r)) => {\n                return Ok(Self::resolve_ref(\n                    r.to_string(),\n                    ref_type.to_string(),\n                    &request,\n                ));\n            }\n            Some((\"path\", p)) => {\n                return Self::resolve_path(PathBuf::from(p), &request);\n            }\n            Some((\"prefix\", p)) => {","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/toolset/tool_version.rs#L386-L422","documentation":"resolve_version in tool_version.rs fails when `tool_config.locked` (or `--locked`) is in effect but the exact tool@version requested is absent from mise.lock. The hint distinguishes a config-level lock (run `mise lock`) from an invocation-level `--locked` (run plain `mise install`).","triggerScenarios":"Running `mise install --locked` (or having `tool_config.locked = true`) after the config requested a new/different tool version that hasn't been recorded in mise.lock yet; also after editing mise.toml versions without re-locking.","commonSituations":"A teammate bumped a tool version in mise.toml and committed without running `mise lock`; CI runs with --locked and fails; a fresh clone has a stale mise.lock relative to config changes.","solutions":["Run `mise lock` to record the requested versions in mise.lock, then retry the locked install.","If the lock came from `--locked` on the command, run `mise install` once without --locked to update the lockfile.","Temporarily disable `tool_config.locked` if you intend to float versions instead of pinning."],"exampleFix":"// before\n$ mise install --locked\nerror: node@22.3.0 is not in the lockfile\n// after\n$ mise lock && mise install --locked","handlingStrategy":"validation","validationCode":"// Before running a locked install, ensure the lockfile is current:\n// mise lock && git diff --exit-code mise.lock\n// In CI, fail early if config changed without re-locking:\ngit diff --quiet HEAD -- mise.toml mise.lock || (echo 'mise.lock out of date; run mise lock' && exit 1)","typeGuard":null,"tryCatchPattern":"try {\n  run('mise install --locked');\n} catch (e) {\n  if (/is not in the lockfile/.test(String(e))) {\n    run('mise lock');\n    run('mise install --locked');\n  } else throw e;\n}","preventionTips":["Run `mise lock` and commit mise.lock whenever you change tool versions in mise.toml.","In CI, use --locked intentionally and keep the lockfile fresh on main.","Add a pre-commit check that mise.lock is up to date with mise.toml."],"tags":["lockfile","versioning","reproducibility","ci"],"backgroundTag":"record-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}