{"record":{"id":"0e924ee52fbc8ebb","repo":"jdx/mise","slug":"monorepo-config-roots-did-not-match-any-config-r","errorCode":null,"errorMessage":"[monorepo].config_roots did not match any config roots","messagePattern":"\\[monorepo\\]\\.config_roots did not match any config roots","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/config/mod.rs","lineNumber":792,"sourceCode":"            .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        let patterns = &monorepo_config\n            .monorepo()\n            .ok_or_else(|| eyre!(\"[monorepo].config_roots is required for monorepo operations\"))?\n            .config_roots;\n        if patterns.is_empty() {\n            bail!(\"[monorepo].config_roots is required for monorepo operations\");\n        }\n        let roots = match filenames {\n            Some(filenames) => {\n                expand_config_roots_with_filenames(&monorepo_root, patterns, None, filenames)?\n            }\n            None => expand_config_root_dirs(&monorepo_root, patterns, None)?,\n        };\n        if roots.is_empty() {\n            bail!(\"[monorepo].config_roots did not match any config roots\");\n        }\n        Ok(roots)\n    }\n\n    pub(crate) async fn monorepo_union_tool_request_set(\n        self: &Arc<Self>,\n    ) -> Result<ToolRequestSet> {\n        Ok(self.monorepo_union().await?.tool_request_set)\n    }\n\n    pub(crate) async fn monorepo_union(self: &Arc<Self>) -> Result<MonorepoUnion> {\n        let idiomatic_filenames = load_idiomatic_filenames().await;\n        let config_filenames = idiomatic_filenames\n            .keys()\n            .chain(DEFAULT_CONFIG_FILENAMES.iter())\n            .cloned()\n            .collect_vec();\n        let roots = self.monorepo_config_root_dirs_with_filenames(&config_filenames)?;","sourceCodeStart":774,"sourceCodeEnd":810,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/config/mod.rs#L774-L810","documentation":"The `[monorepo].config_roots` glob patterns were expanded against the monorepo root directory but matched zero config roots, so mise cannot build the workspace project set. Patterns resolve relative to the project root of the config that sets `monorepo_root = true`, not the current working directory.","triggerScenarios":"`config_roots = [\"services/*\"]` when no `services/` subdirectories exist under the monorepo root, matched directories contain no config files, patterns use the wrong base directory, or a typo/wrong case makes the glob match nothing.","commonSituations":"Patterns written relative to the CWD or a subproject instead of the monorepo root; repo directories renamed after patterns were added; expecting recursive matching from a single-level `*` glob; running mise from a worktree missing expected directories.","solutions":["From the directory containing monorepo_root = true, verify each glob matches: `ls -d apps/* packages/*`","Use `**` for recursive matching (e.g. `\"apps/**\"`) or list each level explicitly","Ensure matched directories actually contain a mise config file (mise.toml/.mise.toml)","For a single root, point config_roots at the directory itself, e.g. `[\"apps/api\"]`"],"exampleFix":"# before (no such directories under the monorepo root)\n[monorepo]\nconfig_roots = [\"services/*\"]\n\n# after\n[monorepo]\nconfig_roots = [\"apps/*\", \"packages/*\"]","handlingStrategy":"validation","validationCode":"cd <monorepo-root> && ls -d apps/* packages/* >/dev/null 2>&1 \\\n  && echo 'config_roots patterns match' || echo 'no directories matched — fix config_roots globs'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Globs resolve from the monorepo root, not your CWD — verify with ls -d from there","Use ** when subdirectories nest more than one level","Ensure matched directories contain an actual mise config file","Re-check patterns after renaming or moving project directories"],"tags":["mise","monorepo","glob","config"],"backgroundTag":"glob-pattern-no-match","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}