jdx/mise · error

Monorepo task paths (like `//path:task` or `:task`) require

Error message

Monorepo task paths (like `//path:task` or `:task`) require a monorepo root configuration.

To set up monorepo support, add this to your root mise.toml:
{}

Then create task files in subdirectories that will be automatically discovered.
See {} for more information.

What it means

Task specs like //path:task or :task address tasks relative to a monorepo root. validate_monorepo_setup bails when the root mise.toml does not set monorepo_root = true, because subdirectory task discovery is only enabled in monorepo mode.

Source

Thrown at src/task/task_list.rs:58

                .map(|e| e.path().to_path_buf())
        })
        .collect()
}

/// Split a task spec into name and args
/// e.g., "task arg1 arg2" -> ("task", vec!["arg1", "arg2"])
pub fn split_task_spec(spec: &str) -> (&str, Vec<String>) {
    let mut parts = spec.split_whitespace();
    let name = parts.next().unwrap_or("");
    let args = parts.map(|s| s.to_string()).collect_vec();
    (name, args)
}

/// Validate that monorepo features are properly configured
fn validate_monorepo_setup(config: &Arc<Config>) -> Result<()> {
    // Check if a monorepo root is configured
    if !config.is_monorepo() {
        bail!(
            "Monorepo task paths (like `//path:task` or `:task`) require a monorepo root configuration.\n\
            \n\
            To set up monorepo support, add this to your root mise.toml:\n\
            {}\n\
            \n\
            Then create task files in subdirectories that will be automatically discovered.\n\
            See {} for more information.",
            style::eyellow("  monorepo_root = true"),
            style::eunderline(
                "https://mise.jdx.dev/tasks/task-configuration.html#monorepo-support"
            )
        );
    }

    Ok(())
}

/// Check if a name is similar to any known CLI subcommands using fuzzy matching

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Add monorepo_root = true to the root mise.toml
  2. Ensure the repo actually has task files in subdirectories for automatic discovery
  3. If you did not mean monorepo syntax, drop the // or : prefix and use the plain task name

Example fix

# before: root mise.toml has no monorepo config
# after
monorepo_root = true
Defensive patterns

Strategy: validation

Validate before calling

// check before invoking monorepo task specs:
if spec.starts_with("//") || spec.starts_with(':') {
    ensure_root_config_has(&repo_root_mise_toml, "monorepo_root = true")?;
}

// or programmatically, the same predicate mise uses:
if !config.is_monorepo() {
    return Err(eyre::bail!("monorepo task syntax requires monorepo_root = true"));
}

Type guard

fn monorepo_syntax_usable(config: &Config) -> bool {
    config.is_monorepo()
}

Try / catch

// config error, not transient: catch only to surface the fix,
match run_tasks(&specs).await {
    Err(err) if err.to_string().contains("monorepo root configuration") => {
        eprintln!("add `monorepo_root = true` to the root mise.toml or use plain task names");
        Err(err)
    }
    other => other,
}

Prevention

When it happens

Trigger: Running something like mise run //services/api:build or mise run :test in a repository whose root mise.toml lacks monorepo_root = true (config.is_monorepo() returns false).

Common situations: Adopting monorepo syntax before enabling the feature; running from a directory where the nearest mise.toml is not the intended monorepo root; config copied from another repo without the monorepo_root key.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/94373b66b46ed314. Report an issue: GitHub.