jdx/mise · error
relative path syntax '{}' is not supported, use '//{}' or ':
Error message
relative path syntax '{}' is not supported, use '//{}' or ':task' for current directory What it means
During task-name expansion for monorepos, mise rejects strings that mix '/' and ':' without starting with '//' (absolute monorepo path) or ':' (colon pattern). Such strings look like an attempted relative monorepo path, e.g. `packages/web:build`, which is ambiguous — mise demands either `//packages/web:build` (absolute from monorepo root) or `:build` (current package).
Source
Thrown at src/task/task_load_context.rs:193
///
/// # Returns
/// * `Ok(String)` - The expanded task pattern (e.g., "//project:build")
/// * `Err` - If monorepo is not configured or current directory is outside monorepo root
pub fn expand_colon_task_syntax(
task: &str,
config: &crate::config::Config,
) -> eyre::Result<String> {
// Skip expansion for absolute monorepo paths or explicit global tasks
if task.starts_with("//") || task.starts_with("::") || is_workspace_project_task(task) {
return Ok(task.to_string());
}
// Check if this is a colon pattern or a bare name
let is_colon_pattern = task.starts_with(':');
// Reject patterns that look like monorepo paths with wrong syntax (have / and : but don't start with // or :)
if !is_colon_pattern && task.contains('/') && task.contains(':') {
bail!(
"relative path syntax '{}' is not supported, use '//{}' or ':task' for current directory",
task,
task
);
}
// Get the monorepo root config file.
let monorepo_root = config
.config_files
.values()
.find(|cf| cf.monorepo_root() == Some(true))
.and_then(|cf| cf.project_root());
// If not in monorepo context, only expand if it's a colon pattern (error), otherwise return as-is
if monorepo_root.is_none() {
if is_colon_pattern {
bail!("Cannot use :task syntax without a monorepo root");
}View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Use the absolute monorepo syntax: `mise //packages/web:build`.
- Use the current-directory shorthand `:build` if the task is in the nearest enclosing package.
- Use a bare task name `build` and let mise resolve/fuzzy-match it across the monorepo.
- Check your monorepo root config has `monorepo = true`-style settings ([monorepo] table / monorepo_root) so scopes resolve as expected.
Example fix
# before $ mise run packages/web:build error: relative path syntax 'packages/web:build' is not supported # after $ mise run //packages/web:build # or, from inside packages/web: $ mise run :build
Defensive patterns
Strategy: validation
Validate before calling
# reject mixed / and : without // or : prefix before invoking mise case "$1" in //*|:*) ;; *:/*|*/*:*) echo "bad task path syntax; use //$1 or a :task" >&2; exit 1;; esac mise "$@"
Prevention
- Standardize on //pkg:task for cross-package invocations in docs and scripts.
- Remember: relative 'pkg:task' paths are never valid; only '//' absolute and ':' current-dir.
When it happens
Trigger: Calling `mise run packages/web:build` or `mise packages/web:build` while task expansion is active (a monorepo root config exists). The guard fires before any scoping because the string has both separators but no recognized prefix.
Common situations: Migrating from another task runner's path syntax (nx, bazel-like `pkg:target`); assuming relative workspace paths work; copy-pasting task names from docs of other tools.
Related errors
- Cannot use :task syntax without a monorepo root
- Cannot use :task syntax outside of monorepo root directory
- Monorepo task paths (like `//path:task` or `:task`) require
- Cannot use :task syntax without a current working directory
- unknown workspace project {id:?}
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/c1e192e076af015e.
Report an issue: GitHub.