{"record":{"id":"b0fd10f75d66044a","repo":"jdx/mise","slug":"is-not-available-required-binary-binary-no","errorCode":null,"errorMessage":"{} is not available: required binary '{binary}' not found; add it to [tools] or install it manually","messagePattern":"(.+?) is not available: required binary '(.+?)' not found; add it to \\[tools\\] or install it manually","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/plugin.rs","lineNumber":231,"sourceCode":"                let mut paths = Self::sync_lookup_path();\n                paths.extend(toolset.list_paths(&config).await);\n                let path =\n                    join_paths(&paths).wrap_err(\"failed to construct package plugin PATH\")?;\n                let mut env: IndexMap<String, String> = crate::env::vars_safe().collect();\n                env.insert(\"PATH\".into(), path.to_string_lossy().into_owned());\n                Ok(env)\n            })\n            .await\n    }\n\n    async fn checked_hook_env(&self) -> Result<&IndexMap<String, String>> {\n        let env = self.hook_env().await?;\n        let paths = env\n            .get(\"PATH\")\n            .map(|path| split_paths(path).collect::<Vec<_>>())\n            .unwrap_or_default();\n        if let Some(binary) = self.missing_from_path(&paths) {\n            bail!(\n                \"{} is not available: required binary '{binary}' not found; add it to [tools] or install it manually\",\n                self.name\n            );\n        }\n        Ok(env)\n    }\n\n    fn requests(pkgs: &[PackageRequest]) -> Vec<VfoxPackageRequest> {\n        pkgs.iter()\n            .map(|pkg| VfoxPackageRequest {\n                name: pkg.name.clone(),\n                version: pkg.version.clone(),\n            })\n            .collect()\n    }\n\n    fn vfox(&self, env: &IndexMap<String, String>) -> Result<vfox::Vfox> {\n        let (mut vfox, _) = self.plugin.vfox()?;","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/plugin.rs#L213-L249","documentation":"Package plugins execute an external binary (declared by the plugin) via Lua hook actions. Before running any hook, `checked_hook_env` verifies that the required binary exists on the PATH that will be given to the hook; if it is missing, mise fails with the plugin name and the missing binary instead of spawning a hook that cannot run. The message points at mise's `[tools]` config because that is the usual way to make the binary available.","triggerScenarios":"Any plugin action (`action`, `uninstall_action`) or `installed` status check when `missing_from_path` finds the plugin's required binary absent from the hook environment's PATH — e.g. the tool providing the binary was never installed, was uninstalled, or is installed but not on PATH for this shell/environment.","commonSituations":"A mise.toml `[tools]` entry for the provider tool is missing or removed; the tool is installed for a different environment/profile but not the active one; PATH manipulation (direnv, shim ordering) hides the tool's bin dir; running mise in a CI container without the provider tool.","solutions":["Add the provider tool to the project's [tools] (mise.toml) so mise installs it and puts its bin dir on PATH.","Run `mise install` to install any declared-but-missing tools, then retry the package operation.","Check `which <binary>` in the failing shell; if absent, fix PATH (shims enabled, correct mise activate) or install the binary manually.","Ensure the required binary name in the plugin definition matches the actual executable the provider tool ships."],"exampleFix":"# before (mise.toml) — plugin binary provider not declared\n[plugins]\nmypackages = \"...\"\n\n# after — declare the tool that provides the required binary\n[tools]\n\"github:owner/provider\" = \"latest\"\n\n# then\nmise install","handlingStrategy":"validation","validationCode":"// Ensure the plugin's required binary is on PATH before package operations\nimport { execSync } from 'node:child_process';\nfunction requireOnPath(binary) {\n  try { execSync(`command -v ${binary}`, { shell: '/bin/bash', stdio: 'ignore' }); }\n  catch { throw new Error(`'${binary}' not on PATH — add its provider to [tools] and run mise install`); }\n}\nrequireOnPath('npm'); // example: the plugin's required binary","typeGuard":"const onPath = (b) => { try { execSync(`command -v ${b}`, { stdio: 'ignore', shell: '/bin/bash' }); return true; } catch { return false; } };","tryCatchPattern":"try { await misePkgInstall(plugin, pkgs) } catch (e) { if (String(e).includes('required binary') && String(e).includes('not found')) { const bin = e.message.match(/binary '(.*?)'/)?.[1]; console.error(`Install the tool providing '${bin}' via [tools] or your system package manager`); } else throw e; }","preventionTips":["Declare every tool a package plugin depends on in the project's [tools] section.","Run `mise install` in CI before package operations so provider binaries exist.","After changing PATH tools (direnv, shims), re-check `command -v <binary>` before invoking mise package commands.","Verify shim/activation setup (`mise doctor`) so mise-installed tools are on PATH in non-interactive shells."],"tags":["missing-binary","path","package-plugin","dependency"],"backgroundTag":"missing-dependency","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"}