{"record":{"id":"2de265da61b070e1","repo":"jdx/mise","slug":"cannot-order-missing-bootstrap-resource-resource","errorCode":null,"errorMessage":"cannot order missing bootstrap resource '{resource}'","messagePattern":"cannot order missing bootstrap resource '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/resources.rs","lineNumber":254,"sourceCode":"        };\n        if !resource.depends_on.contains(&dependency) {\n            resource.depends_on.push(dependency);\n        }\n        Ok(())\n    }\n\n    pub(crate) fn output(&self) -> Result<BootstrapPlanOutput<'_>> {\n        let resources = self.ordered()?;\n        let mut summary = PlanSummary::default();\n        for resource in &resources {\n            summary.add(resource.action);\n        }\n        Ok(BootstrapPlanOutput { resources, summary })\n    }\n\n    fn add_ordering(&mut self, resource: &ResourceId, predecessor: ResourceId) -> Result<()> {\n        let Some(resource) = self.resources.get_mut(resource) else {\n            bail!(\"cannot order missing bootstrap resource '{resource}'\");\n        };\n        if !resource.order_after.contains(&predecessor) {\n            resource.order_after.push(predecessor);\n        }\n        Ok(())\n    }\n\n    fn ordered(&self) -> Result<Vec<&ResourcePlan>> {\n        let mut incoming = self\n            .resources\n            .keys()\n            .cloned()\n            .map(|id| (id, 0_usize))\n            .collect::<IndexMap<_, _>>();\n        let mut outgoing: HashMap<ResourceId, Vec<ResourceId>> = HashMap::new();\n\n        for resource in self.resources.values() {\n            for dependency in resource.depends_on.iter().chain(&resource.order_after) {","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/resources.rs#L236-L272","documentation":"BootstrapPlan::add_ordering records an `order_after` edge controlling phase ordering. Like add_dependency, it validates the target resource exists; ordering against an undeclared id bails with this error. It exists to keep the ordering graph closed over declared resources.","triggerScenarios":"`mise bootstrap` planning where an ordering directive references a resource id that was never inserted into the plan (typo or removed resource).","commonSituations":"Reordering phases after renaming ids; declaring an order_after pointing at a resource defined in a config file that isn't loaded; manual edits to bootstrap config order entries.","solutions":["Check the ordering entry's resource id against the declared ids in your bootstrap config.","Fix the typo or declare the missing resource.","Remove the ordering entry if the predecessor no longer exists.","Re-run the bootstrap plan to verify ordering resolves."],"exampleFix":"# before\n[[bootstrap.resources]]\nid = \"dotfiles\"\norder_after = [\"pakages\"]  # typo\n# after\n[[bootstrap.resources]]\nid = \"dotfiles\"\norder_after = [\"packages\"]","handlingStrategy":"validation","validationCode":"# Verify every order_after id is declared\nfor dep in $(grep -oP '(?<=order_after = \\[\")[^\"]+' mise.toml); do\n  grep -q \"id = \\\"$dep\\\"\" mise.toml || echo \"missing resource: $dep\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Update ordering entries whenever resource ids change.","Keep ordering references consistent with declared ids via a shared naming convention.","Avoid conditional configs that can drop a resource still referenced by order_after.","Dry-run the plan before applying."],"tags":["bootstrap","config","ordering"],"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"}