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 pattern matching (get_matching), any pattern containing both '/' and ':' but not starting with '//' or ':' is rejected. Such a pattern looks like a monorepo project-path/task reference written with unsupported relative syntax, so mise fails fast instead of silently matching nothing.
Source
Thrown at src/task/mod.rs:3346
.iter()
.filter(|(name, _)| {
name.split_once('#').is_some_and(|(project, task)| {
project_matcher.is_match(project)
&& task_name_matches(&task_matcher, task, false)
})
})
.map(|(_, task)| task)
.unique()
.collect());
}
// === Monorepo pattern matching ===
// Only patterns starting with '//' or ':' are monorepo patterns
// Reject patterns that look like monorepo paths but use wrong syntax (have / and : but don't start with // or :)
if !pat.starts_with("//") && !pat.starts_with(':') {
// Check if this looks like an attempt at a monorepo path with wrong syntax
if pat.contains('/') && pat.contains(':') {
bail!(
"relative path syntax '{}' is not supported, use '//{}' or ':task' for current directory",
pat,
pat
)
}
// If it doesn't contain glob syntax or ':', it's a simple task name
if !pat.contains(['*', '?', '[', '{']) && !pat.contains("...") && !pat.contains(':') {
// Prefer exact name matches; only fall back to extension-stripped
// matches when there is no exact match. Otherwise a TOML task
// "hello" and an auto-discovered file task "hello.sh" would both
// match `mise run hello` and run the script twice (#10298).
let exact: Vec<&T> = self
.iter()
.filter(|(k, _)| k.as_str() == pat)
.map(|(_, v)| v)
.collect();
if !exact.is_empty() {
return Ok(exact);View on GitHub (pinned to 6f52dcdf99)
Solutions
- Use absolute monorepo syntax from the workspace root: '//apps/web:build'
- Or reference a task in the current config's directory with ':build'
- Or use the plain task name if it is unique: 'build'
Example fix
# before depends = ["apps/web:build"] # after depends = ["//apps/web:build"]
Defensive patterns
Strategy: validation
Validate before calling
# reject path-like task refs missing the // or : prefix
python3 - <<'EOF'
import tomllib, sys
cfg = tomllib.load(open('mise.toml','rb'))
for name, t in cfg.get('tasks', {}).items():
for d in t.get('depends', []):
s = str(d)
if '/' in s and ':' in s and not (s.startswith('//') or s.startswith(':')):
sys.exit(f"{name}: use '//{s}' or ':task', got '{s}'")
print('ok')
EOF Prevention
- Memorize the two legal monorepo prefixes: '//path:task' (root-relative) and ':task' (current dir)
- Let shell completion suggest task names instead of typing paths
When it happens
Trigger: depends = ["apps/web:build"] or running `mise run src/api:test` — the pattern contains '/' and ':' yet starts with neither '//' nor ':'. The bail fires in the non-monorepo branch of the matcher before any name comparison happens.
Common situations: Migrating from another task runner's path:task syntax (e.g. turbo/nx style); typing a monorepo path and forgetting the leading double slash; converting a shell script that cd's into a subdirectory and runs a task there.
Related errors
- missing task name in monorepo path '{}', use '{}:<task>' or
- {err}
- ^task dependencies are supported only in depends
- remote cache blob packs require a positive max_pack_bytes li
- `{dp}` is not executable. {}
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/0d28c2061a5d782b.
Report an issue: GitHub.