jdx/mise · error

is not a valid shim. This likely means you uninstalled a…

Error message

{bin_name} is not a valid shim. This likely means you uninstalled a tool and the shim does not point to anything. Run `mise use <TOOL>` to reinstall the tool.

What it means

err_no_version_set resolved a shim's bin name to a toolset but the candidate ToolVersion list is empty — typically the tool was uninstalled or its versions removed while the shim file remained. The shim points at nothing, so mise tells you to reinstall with `mise use <TOOL>`.

Solutions

  1. Run `mise use <TOOL>` to (re)install a version of the tool
  2. Remove the stale shim with `mise prune` or reinstall mise shims
  3. Check `mise ls` to confirm the tool is installed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/shims.rs:1856 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/shims.rs:1856

    )
    .await?;
    file::make_executable_async(shim).await?;
    trace!(
        "shim created from {} to {}",
        target.display(),
        shim.display()
    );
    Ok(())
}

async fn err_no_version_set(
    config: &Arc<Config>,
    ts: Toolset,
    bin_name: &str,
    tvs: Vec<ToolVersion>,
) -> Result<PathBuf> {
    if tvs.is_empty() {
        bail!(
            "{bin_name} is not a valid shim. This likely means you uninstalled a tool and the shim does not point to anything. Run `mise use <TOOL>` to reinstall the tool."
        );
    }
    let missing_plugins = tvs.iter().map(|tv| tv.ba()).collect::<HashSet<_>>();
    let mut missing_tools = ts
        .list_missing_versions(config)
        .await
        .into_iter()
        .filter(|t| missing_plugins.contains(t.ba()))
        .collect_vec();
    if missing_tools.is_empty() {
        if let Some(msg) = unavailable_configured_tool_message(config, &ts, bin_name) {
            return Err(eyre!(msg));
        }
        let mut msg = format!("No version is set for shim: {bin_name}\n");
        msg.push_str("Set a global default version with one of the following:\n");
        for tv in tvs {
            msg.push_str(&format!("mise use -g {}@{}\n", tv.ba(), tv.version));

View on GitHub (pinned to 533346cc37)