jdx/mise · error

no version specified for tool {tool} use `mise shell {tool}@

Error message

no version specified for tool {tool}
use `mise shell {tool}@VERSION` to set a version

What it means

`mise shell` (src/cli/shell.rs:70) errors when a tool argument is given without a version. Shell must know exactly which tool version to activate, so each ToolArg must carry a resolved ToolVersionRequest (`ta.tvr`). If it is None — e.g. the user wrote `mise shell node` instead of `mise shell node@22` — mise bails instead of guessing a default.

Source

Thrown at src/cli/shell.rs:70

            err_inactive()?;
        }

        let shell = require_shell(
            None,
            &format!("Re-run `mise activate {EXAMPLE_SHELL}` in your shell rc file."),
        )?;

        if self.unset {
            for ta in &self.tool {
                let op = shell.unset_env(&tool_env_var_name(&ta.ba.short));
                print!("{op}");
            }
            return Ok(());
        }

        for ta in &self.tool {
            if ta.tvr.is_none() {
                bail!(
                    "no version specified for tool {tool}\nuse `mise shell {tool}@VERSION` to set a version",
                    tool = ta.ba.short,
                );
            }
        }

        let mut ts = ToolsetBuilder::new()
            .with_args(&self.tool)
            .build(&config)
            .await?;
        let opts = InstallOptions {
            force: false,
            jobs: self.jobs,
            raw: self.raw,
            ..Default::default()
        };
        let (_, missing) = ts.install_missing_versions(&mut config, &opts).await?;
        ts.notify_missing_versions(missing);

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Append a version: `mise shell node@22.0.0`.
  2. Use a version alias or prefix such as `mise shell node@lts` or `mise shell node@22`.
  3. If you want the project-configured version, activate the environment with `mise activate` or run commands via `mise exec` instead.
  4. Check `mise ls <tool>` to find an installed version to pin.

Example fix

// before
mise shell node

// after
mise shell node@22
Defensive patterns

Strategy: validation

Validate before calling

const m = process.argv.match(/^mise shell (\S+)$/);
if (m && !m[1].includes('@')) {
  throw new Error('mise shell requires tool@VERSION; got: ' + m[1]);
}

Prevention

When it happens

Trigger: Running `mise shell <tool>` with no `@VERSION` suffix and no version resolvable from config for that tool argument, so `ta.tvr` is None when run() iterates `self.tool`.

Common situations: Typing `mise shell node` out of habit; forgetting the `@` suffix; assuming mise shell falls back to the global or .tool-versions version like some other commands do; scripting shell activation with positional tool names only.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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