jdx/mise · error

bootstrap compose project '{}' depends on missing resource '

Error message

bootstrap compose project '{}' depends on missing resource '{}'

What it means

When bootstrapping a compose project, the planner validates that every explicitly requested dependency resource exists in the plan being built. If an explicit dependency (e.g. a 'firewall/linux' resource or any user-supplied ResourceId) is not present in plan.resources, the plan is ambiguous or unsatisfiable, so planning bails before any changes are applied.

Source

Thrown at src/system/resources.rs:595

            plan.add_dependency(&policy_id, dependency.clone())?;
        }
    }
    let mut compose = super::compose::prepare_requests_from_config(config)?;
    super::compose::inspect_requests(&mut compose);
    for request in &compose {
        let mut dependencies = request
            .path_dependencies()
            .iter()
            .filter(|dependency| plan.resources.contains_key(*dependency))
            .cloned()
            .collect::<IndexSet<_>>();
        let firewall = ResourceId::new("firewall", "linux");
        if plan.resources.contains_key(&firewall) {
            dependencies.insert(firewall);
        }
        for dependency in request.explicit_dependencies() {
            if !plan.resources.contains_key(dependency) {
                bail!(
                    "bootstrap compose project '{}' depends on missing resource '{}'",
                    request.name,
                    dependency
                );
            }
            dependencies.insert(dependency.clone());
        }
        let dependency_changed = dependencies.iter().any(|dependency| {
            plan.resources.get(dependency).is_some_and(|resource| {
                matches!(
                    resource.action,
                    ResourceAction::Create | ResourceAction::Update | ResourceAction::Remove
                )
            })
        });
        let resource = request.plan_with_dependency_change(dependency_changed);
        let id = resource.id.clone();
        plan.insert(resource)?;

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Add the missing resource to the bootstrap configuration so it is included in the plan.
  2. Correct the dependency name/id to match an existing declared resource (check exact resource kind and name spelling).
  3. Remove the explicit dependency if it is no longer needed.
  4. Verify with the surrounding plan code that conditional resources (like firewall) are actually being declared on this platform before depending on them.

Example fix

// before
request.depends_on("firewalld"); // no such resource declared
// after
request.depends_on("firewall"); // matches ResourceId::new("firewall", "linux") declared in config
Defensive patterns

Strategy: validation

Validate before calling

fn check_deps(requested: &[String], planned: &std::collections::HashSet<String>) -> Result<(), String> {
    for dep in requested {
        if !planned.contains(dep) {
            return Err(format!("dependency '{dep}' is not declared in this bootstrap plan"));
        }
    }
    Ok(())
}

Prevention

When it happens

Trigger: Calling plan for a bootstrap compose project whose request.explicit_dependencies() returns a ResourceId that was never added to the plan — for example a dependency name that is misspelled, defined in a different file/environment, or simply not declared at all.

Common situations: Typo in a depends_on-style entry in bootstrap config; depending on a resource that is conditionally declared and was skipped on this host; depending on 'firewall' when no firewall resource got planned; moving config between files so the dependency declaration survives but the resource definition does not.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/922f9f3d857386cf. Report an issue: GitHub.