jdx/mise · error

output does not exist

Error message

output {} does not exist

What it means

For a non-glob (literal) cache output, if the path doesn't exist on disk (neither exists() nor symlink_metadata succeeds) and require_matches is set, mise refuses to build a cache entry around a missing artifact. This catches tasks that claim outputs they never produced.

Solutions

  1. Verify the task command actually creates the declared output and fix the build if not
  2. Correct the output path to match what the task produces
  3. Remove the stale/broken symlink and regenerate the output

Example fix

# before
outputs = ['build/app']
# after (tool writes to out/)
outputs = ['out/app']
Defensive patterns

Strategy: validation

Validate before calling

test -e build/app || echo "declared output build/app missing"

Try / catch

if err contains 'does not exist':
    verify_task_command_ran_and_created_outputs()

Prevention

When it happens

Trigger: Task declares `outputs = ['build/app']` but the file was never created, was deleted, or is a broken symlink at the time the cache is saved; the matcher accepted the path but the existence re-check failed.

Common situations: Build step failed or was skipped; output removed by a later cleanup step; typo in output path; broken symlink pointing to a nonexistent target.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/7c1b759b25484de2. Report an issue: GitHub.

Appendix: source

Thrown at src/task/task_cache.rs:1309

                    if is_output(&matcher, &path, is_dir) {
                        resolved.insert(rel);
                    }
                }
            }
            if require_matches && !glob_matched {
                bail!("output pattern {output:?} matched no files");
            }
        } else {
            let rel = PathBuf::from(&output);
            let abs = root.join(&rel);
            let is_dir = fs::symlink_metadata(&abs)
                .map(|metadata| metadata.is_dir())
                .unwrap_or(false);
            if !is_output(&matcher, &abs, is_dir) {
                continue;
            }
            if require_matches && !abs.exists() && fs::symlink_metadata(&abs).is_err() {
                bail!("output {} does not exist", rel.display());
            }
            resolved.insert(rel);
        }
    }
    Ok(resolved.into_iter().collect())
}

fn remove_nested_roots(mut roots: Vec<PathBuf>) -> Vec<PathBuf> {
    roots.sort_by_key(|path| path.components().count());
    let mut result = Vec::<PathBuf>::new();
    for root in roots {
        if !result.iter().any(|parent| root.starts_with(parent)) {
            result.push(root);
        }
    }
    result.sort();
    result
}

View on GitHub (pinned to 533346cc37)