jdx/mise · error
bootstrap resource ' ' is declared more than once
Error message
bootstrap resource '{}' is declared more than once What it means
BootstrapPlan::insert validates that each resource ID is unique while building the bootstrap plan. If two resources in the bootstrap configuration resolve to the same ResourceId, planning fails with this error rather than silently overwriting one resource's plan.
Solutions
- Find the duplicate id named in the message in your bootstrap config (mise.toml bootstrap sections).
- Remove the redundant declaration or rename one so ids are unique.
- Re-run `mise bootstrap` (or the plan step) to confirm planning succeeds.
- Refactor shared dependencies into a single resource that others depend on.
Example fix
# before: duplicate id [[bootstrap.resources]] id = "packages" ... [[bootstrap.resources]] id = "packages" # duplicate # after: unique ids [[bootstrap.resources]] id = "packages" [[bootstrap.resources]] id = "dotfiles"
Defensive patterns
Strategy: validation
Validate before calling
# Check for duplicate resource ids in your bootstrap config before running ids=$(grep -oP '(?<=^id = ").*(?=")' mise.toml | sort) [ "$(echo "$ids" | sort -u | wc -l)" = "$(echo "$ids" | wc -l)" ] || echo "duplicate ids found"
Prevention
- Keep one canonical declaration per resource id across all config files.
- Name resource ids by their unique path/package, not generic labels.
- Review merged configs for duplicate blocks after copy-paste edits.
- Run the bootstrap plan/dry-run before apply to catch duplicates safely.
When it happens
Trigger: `mise bootstrap` planning (plan/insert) where two declared resources (e.g. two file/package entries) produce the same resource id — duplicate declarations of the same path or package in the bootstrap config.
Common situations: Copy-pasting a [[bootstrap.resources]] block and forgetting to change the id/path; declaring the same package in two config files that get merged; a file resource and package resource colliding on an id.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- [bootstrap].config_roots did not match any config roots
- bootstrap resource ' ' depends on missing resource
- bootstrap users and groups are only supported on Linux
- bootstrap users and groups are only supported on Linux
- cannot add dependency to missing bootstrap resource
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/dd3673a71823e8dd.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/resources.rs:220
}
}
#[derive(Serialize)]
pub(crate) struct BootstrapPlanOutput<'a> {
pub resources: Vec<&'a ResourcePlan>,
pub summary: PlanSummary,
}
/// A validated resource graph in declaration order.
#[derive(Default)]
pub(crate) struct BootstrapPlan {
resources: IndexMap<ResourceId, ResourcePlan>,
}
impl BootstrapPlan {
pub(crate) fn insert(&mut self, resource: ResourcePlan) -> Result<()> {
if self.resources.contains_key(&resource.id) {
bail!(
"bootstrap resource '{}' is declared more than once",
resource.id
);
}
self.resources.insert(resource.id.clone(), resource);
Ok(())
}
pub(crate) fn add_dependency(
&mut self,
resource: &ResourceId,
dependency: ResourceId,
) -> Result<()> {
let Some(resource) = self.resources.get_mut(resource) else {
bail!("cannot add dependency to missing bootstrap resource '{resource}'");
};
if !resource.depends_on.contains(&dependency) {
resource.depends_on.push(dependency);View on GitHub (pinned to 533346cc37)