{"record":{"id":"d17f75799fd6e27f","repo":"jdx/mise","slug":"bin-name-is-a-mise-bin-however-it-is-not-current","errorCode":null,"errorMessage":"{bin_name} is a mise bin however it is not currently active. Use `mise use` to activate it in this directory.","messagePattern":"(.+?) is a mise bin however it is not currently active\\. Use `mise use` to activate it in this directory\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/which.rs","lineNumber":83,"sourceCode":"                } else if self.plugin {\n                    miseprintln!(\"{p}\");\n                } else {\n                    let path = p.which(&config, &tv, &bin_name).await?;\n                    miseprintln!(\"{}\", path.unwrap().display());\n                }\n                Ok(())\n            }\n            None => {\n                if let Some(msg) = self.uninstalled_tool_message(&config, &ts) {\n                    bail!(msg);\n                }\n                if let Some(msg) =\n                    crate::shims::unavailable_configured_tool_message(&config, &ts, &bin_name)\n                {\n                    bail!(msg);\n                }\n                if self.has_shim(&bin_name) {\n                    bail!(\n                        \"{bin_name} is a mise bin however it is not currently active. Use `mise use` to activate it in this directory.\"\n                    )\n                } else {\n                    bail!(\"{bin_name} is not a mise bin. Perhaps you need to install it first.\",)\n                }\n            }\n        }\n    }\n    async fn complete(&self, config: &Arc<Config>) -> Result<()> {\n        let ts = self.get_toolset(config).await?;\n        let bins = ts\n            .list_paths(config)\n            .await\n            .into_iter()\n            .flat_map(|p| file::ls(&p).unwrap_or_default())\n            .map(|p| p.file_name().unwrap().to_string_lossy().to_string())\n            .unique()\n            .sorted()","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/which.rs#L65-L101","documentation":"`mise which <bin>` throws this when the bin corresponds to a mise-managed tool (a shim exists for it) but the tool is not active in the current directory's toolset — the shim points at a mise bin that no active config enables here.","triggerScenarios":"`mise which <bin>` with `self.has_shim(&bin_name)` true but the bin absent from the resolved Toolset — e.g. the tool is used in another project's config, globally uninstalled, or deactivated in this directory.","commonSituations":"Running a tool shim in a repo that doesn't `mise use` that tool; a colleague removed the tool from mise.toml; running from a directory above the one where the tool is configured.","solutions":["Activate the tool in this directory: `mise use <tool>@<version>` (as the message suggests).","cd into the directory where the tool is configured before invoking it.","Add the tool to the global config: `mise use -g <tool>@<version>` if you want it everywhere."],"exampleFix":"// before (fails in this dir)\nmise which terraform\n// after\nmise use terraform@1.9\nmise which terraform","handlingStrategy":"fallback","validationCode":"mise ls --json | jq -e --arg b \"$bin\" 'any(.[]; .active == true)' >/dev/null || echo \"$bin not active here\"","typeGuard":null,"tryCatchPattern":"if ! mise which \"$bin\" 2>/dev/null; then\n  mise use \"$tool@$ver\" && mise which \"$bin\"\nfi","preventionTips":["Activate all needed tools in each project with `mise use`","Use global config (`mise use -g`) for tools needed everywhere","Remember shims only resolve when the tool is active in the current config"],"tags":["cli","shim","activation"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}