{"record":{"id":"4d006145f5325e91","repo":"jdx/mise","slug":"no-version-specified-for-tool-tool-use-mise-she","errorCode":null,"errorMessage":"no version specified for tool {tool}\nuse `mise shell {tool}@VERSION` to set a version","messagePattern":"no version specified for tool (.+?)\nuse `mise shell (.+?)@VERSION` to set a version","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/shell.rs","lineNumber":70,"sourceCode":"            err_inactive()?;\n        }\n\n        let shell = require_shell(\n            None,\n            &format!(\"Re-run `mise activate {EXAMPLE_SHELL}` in your shell rc file.\"),\n        )?;\n\n        if self.unset {\n            for ta in &self.tool {\n                let op = shell.unset_env(&tool_env_var_name(&ta.ba.short));\n                print!(\"{op}\");\n            }\n            return Ok(());\n        }\n\n        for ta in &self.tool {\n            if ta.tvr.is_none() {\n                bail!(\n                    \"no version specified for tool {tool}\\nuse `mise shell {tool}@VERSION` to set a version\",\n                    tool = ta.ba.short,\n                );\n            }\n        }\n\n        let mut ts = ToolsetBuilder::new()\n            .with_args(&self.tool)\n            .build(&config)\n            .await?;\n        let opts = InstallOptions {\n            force: false,\n            jobs: self.jobs,\n            raw: self.raw,\n            ..Default::default()\n        };\n        let (_, missing) = ts.install_missing_versions(&mut config, &opts).await?;\n        ts.notify_missing_versions(missing);","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/shell.rs#L52-L88","documentation":"`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.","triggerScenarios":"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`.","commonSituations":"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.","solutions":["Append a version: `mise shell node@22.0.0`.","Use a version alias or prefix such as `mise shell node@lts` or `mise shell node@22`.","If you want the project-configured version, activate the environment with `mise activate` or run commands via `mise exec` instead.","Check `mise ls <tool>` to find an installed version to pin."],"exampleFix":"// before\nmise shell node\n\n// after\nmise shell node@22","handlingStrategy":"validation","validationCode":"const m = process.argv.match(/^mise shell (\\S+)$/);\nif (m && !m[1].includes('@')) {\n  throw new Error('mise shell requires tool@VERSION; got: ' + m[1]);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass tool@VERSION to mise shell, even in aliases.","List installed versions with `mise ls <tool>` before choosing.","Use mise exec/activate when you want config-driven versions instead of explicit ones."],"tags":["cli","tools","missing-version","shell"],"backgroundTag":"missing-required-argument","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"}