jdx/mise · error

missing task name in monorepo path

Error message

missing task name in monorepo path '{}', use '{}:<task>' or '{}:*' to run all tasks in that path

What it means

A monorepo pattern of the form '//path/...' without a ':task' portion doesn't say which task to run. During pattern parsing, mise splits on ':' and bails when a '//'-prefixed pattern has no task part, telling the user to add ':<task>' or ':*' for all tasks in that path.

Solutions

  1. Append a task name: '//pkg/util:build'
  2. Append ':*' to run every task in that path: '//pkg/util:*'
  3. If you meant a plain task name, remove the leading '//' and slashes

Example fix

// before
mise run //pkg/util

// after
mise run //pkg/util:*
Defensive patterns

Strategy: validation

Validate before calling

function isCompleteMonorepoPattern(pat) {
  if (!pat.startsWith('//')) return true;
  return pat.includes(':');
}

Prevention

When it happens

Trigger: Running `mise run //pkg/util` or depending on `//pkg/util` with no ':' and task name — the path part alone is not a runnable pattern.

Common situations: Users expecting a directory-only pattern to run all tasks by default, or truncating a copied '//pkg/util:build' reference.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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

Appendix: source

Thrown at src/task/mod.rs:3589

        }

        // === Parse monorepo pattern ===
        let normalized_pat = if pat.starts_with("//") {
            pat.to_string()
        } else if pat.starts_with(':') {
            // Special case: :task should have been expanded before calling get_matching
            // If we reach here, it means the expansion didn't happen properly
            bail!("':task' pattern should be expanded before matching")
        } else {
            pat.to_string()
        };

        // Split pattern into path and task parts
        // Pattern format: //path/...:task* or //path:task*
        let parts: Vec<&str> = normalized_pat.splitn(2, ':').collect();
        if pat.starts_with("//") && parts.len() == 1 {
            bail!(
                "missing task name in monorepo path '{}', use '{}:<task>' or '{}:*' to run all tasks in that path",
                pat,
                pat,
                pat
            );
        }
        let (path_pattern, task_pattern) = match parts.as_slice() {
            [path, task] => (*path, *task),
            [path] => (*path, "*"),
            _ => (normalized_pat.as_str(), "*"),
        };

        // === Convert ellipsis to glob syntax ===
        // Convert ellipsis (...) to glob pattern (**)
        // //... matches everything, //foo/... matches foo and all subdirs
        let path_glob = path_pattern.replace("...", "**");
        let trailing_ellipsis_base = path_pattern
            .strip_suffix("/...")
            .map(|base| if base == "/" { "//" } else { base });

View on GitHub (pinned to 533346cc37)