{"record":{"id":"a5967ccd6e29ea4c","repo":"jdx/mise","slug":"failed-to-discover-workspace-providers-error","errorCode":null,"errorMessage":"failed to discover workspace providers: {error}","messagePattern":"failed to discover workspace providers: (.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/config/mod.rs","lineNumber":648,"sourceCode":"        let cf = find_monorepo_config(&self.config_files)?;\n        let monorepo = cf.monorepo();\n        Some((\n            cf.get_path().to_path_buf(),\n            monorepo.and_then(|config| config.lockfile),\n            monorepo\n                .map(|config| config.config_roots.clone())\n                .unwrap_or_default(),\n        ))\n    }\n\n    /// Discovers the provider-neutral workspace project graph and applies the\n    /// explicit overrides from the active monorepo root.\n    pub(crate) fn workspace_project_graph(\n        &self,\n    ) -> Result<Arc<crate::task::workspace::WorkspaceProjectGraph>> {\n        let graph = self.workspace_project_graph_for_task_loading()?;\n        if let Some(error) = graph.provider_discovery_error() {\n            bail!(\"failed to discover workspace providers: {error}\");\n        }\n        Ok(graph)\n    }\n\n    /// Resolves workspace-global task inputs using the active monorepo root context.\n    pub(crate) async fn monorepo_global_task_inputs(self: &Arc<Self>) -> Result<Vec<String>> {\n        let monorepo_config = find_monorepo_config(&self.config_files)\n            .ok_or_else(|| eyre!(\"no config file in scope sets monorepo_root = true\"))?;\n        let monorepo_root = monorepo_config\n            .project_root()\n            .ok_or_else(|| eyre!(\"monorepo root config has no project root\"))?\n            .to_path_buf();\n        let configs = self\n            .config_files\n            .values()\n            .filter(|cf| cf.config_root() == monorepo_root)\n            .collect::<Vec<_>>();\n        let task_inputs = ResolvedTaskInputs::from_configs(&configs);","sourceCodeStart":630,"sourceCodeEnd":666,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/config/mod.rs#L630-L666","documentation":"`Config::workspace_project_graph()` builds the provider-neutral workspace project graph used by experimental monorepo support. If provider discovery itself recorded an error, mise re-raises it wrapped in this message; the `{error}` suffix carries the root cause, such as a workspace manifest that failed to parse or a workspace detection command that exited non-zero.","triggerScenarios":"Running monorepo-aware commands (workspace task loading, project graph queries) with `experimental = true` and a `[monorepo]` config while a workspace provider fails discovery — e.g. a malformed pnpm-workspace.yaml / package.json workspaces field / Cargo.toml workspace section, or the workspace package manager missing from PATH.","commonSituations":"Enabling experimental monorepo features on a repo with a broken or half-migrated workspace manifest; CI images lacking the package manager that the workspace provider shells out to; YAML/TOML syntax errors introduced during refactoring.","solutions":["Read the text after the colon — it contains the underlying provider error; fix that root cause (repair the workspace manifest, install the missing package manager)","Re-run with MISE_DEBUG=1 MISE_TRACE=1 to get the full error chain and backtrace from the failing provider","Temporarily set experimental=false or remove the [monorepo] block to confirm workspace discovery is the trigger","If the manifest is valid and discovery still fails, report a bug with the debug output"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"python3 -c 'import tomllib; tomllib.load(open(\"Cargo.toml\",\"rb\"))' && \\\nnode -e 'JSON.parse(require(\"fs\").readFileSync(\"package.json\"))' && \\\npython3 -c 'import yaml,sys; yaml.safe_load(open(\"pnpm-workspace.yaml\"))' 2>/dev/null; echo 'manifests parse ok'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Parse all workspace manifests (package.json, pnpm-workspace.yaml, Cargo.toml) in CI before enabling experimental monorepo support","Keep the workspace package manager installed in CI images so provider detection commands can run","Treat provider_discovery_error suffixes as the real error — always read past the colon","Pin a known-good mise version when using experimental workspace features"],"tags":["mise","monorepo","workspace","experimental","discovery"],"backgroundTag":"workspace-detection-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}