jdx/mise · error · eyre::Report
'{}' depends on unknown '{}'
Error message
'{}' depends on unknown '{}' What it means
`DepsGraph::new` (src/deps_graph.rs) builds a petgraph from node keys plus `(from, to)` edges. An unknown `from` is silently skipped (`continue`), but an edge whose `to` key has no registered node bails: that dependency could never be fulfilled/awaited, which usually indicates a `depends` reference to a task that does not exist or was not loaded.
Source
Thrown at src/deps_graph.rs:66
key_fn: fn(&N) -> K,
) -> Result<Self> {
let mut graph = StableGraph::new();
let mut node_indices = HashMap::new();
for (key, node) in nodes {
if node_indices.contains_key(&key) {
continue;
}
let idx = graph.add_node(node);
node_indices.insert(key, idx);
}
for (from_key, to_key) in edges {
let Some(&from_idx) = node_indices.get(&from_key) else {
continue;
};
let Some(&to_idx) = node_indices.get(&to_key) else {
bail!("'{}' depends on unknown '{}'", from_key, to_key);
};
if from_key != to_key {
graph.update_edge(from_idx, to_idx, ());
}
}
let (tx, _) = mpsc::unbounded_channel();
let mut deps = Self {
graph,
node_indices,
sent: HashSet::new(),
blocked: HashSet::new(),
tx,
key_fn,
};
deps.detect_and_block_cycles();View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Read the message: task `<from_key>` depends on `<to_key>`, which mise cannot find as a node
- Fix the name typo, or define/load the missing task in the same config context
- If the dependency is conditionally defined, make its definition unconditional or remove the `depends` entry when it's absent
- Confirm the exact task names as mise sees them with `mise tasks ls`
Example fix
# before [tasks.build] depends = ['lnt'] # typo, no task 'lnt' # after [tasks.build] depends = ['lint'] [tasks.lint] run = "echo lint"
Defensive patterns
Strategy: validation
Validate before calling
# verify every depends target exists as a task before running
import tomllib, sys
cfg = tomllib.load(open("mise.toml", "rb"))
tasks = cfg.get("tasks", {})
for name, t in tasks.items():
for dep in t.get("depends", []):
dep = dep.split(":")[0] if isinstance(dep, str) else dep
if dep not in tasks:
sys.exit(f"task {name} depends on unknown task {dep!r}") Prevention
- Run `mise tasks ls` after adding/removing tasks to confirm names resolve
- When deleting a task, grep all configs for its name in depends lists first
- Keep matrix task naming consistent (`name:variant`) between producers and dependents
When it happens
Trigger: Constructing the task dependency graph with an edge whose target key is not among the nodes — e.g. a task declares `depends = ["lint"]` but `lint` is not defined in any loaded config, is disabled by platform/run filters, or has a name variant (`build:web` matrix naming) that does not match the node key.
Common situations: Typos in `depends` entries; depending on tasks defined in a config file that isn't included in that context; tasks removed during refactoring while dependents remain; file-task vs named-task mismatches; matrix task name formats differing from what dependents wrote.
Related errors
- deps provider '{}' depends on unknown provider '{}'
- provider '{}' is inactive: {reason}
- deps run command cannot be empty
- Monorepo task paths (like `//path:task` or `:task`) require
- Task not found: {task_spec}, use `mise tasks ls --all --hidd
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/103075d7ef54f781.
Report an issue: GitHub.