jdx/mise · error

no tasks defined in . Are you in a project directory?

Error message

no tasks defined in {}. Are you in a project directory?

What it means

Terminal case of err_no_task: no tasks are defined anywhere in scope, no non-executable candidates exist, and no similar subcommand matched — the directory simply has no tasks, and the message asks whether you are in the intended project directory.

Solutions

  1. cd into the project that defines the tasks
  2. Create a task (mise.toml [tasks] block or a file in mise-tasks/)
  3. Run `mise tasks` to list what mise can see from here
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/task/task_list.rs:355 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/task/task_list.rs:355

            if let Some(first) = non_exec_files.first() {
                let dirs_with_files: Vec<String> = includes
                    .iter()
                    .filter(|d| d.is_dir())
                    .map(display_path)
                    .collect();
                bail!(
                    "no tasks defined in {}, but found {} non-executable file(s) in {}.\n\
                        Files must be executable to be detected as tasks.\n\
                        {}",
                    display_path(dirs::CWD.clone().unwrap_or_default()),
                    non_exec_files.len(),
                    dirs_with_files.join(", "),
                    file::make_executable_hint(first),
                );
            }
        }

        bail!(
            "no tasks defined in {}. Are you in a project directory?",
            display_path(dirs::CWD.clone().unwrap_or_default())
        );
    }
    if let Some(task) = make_task_executable(config, name, task_context).await? {
        return Ok(Some(task));
    }

    // Suggest similar tasks using fuzzy matching for monorepo tasks
    let mut err_msg = format!("no task {} found", style::ered(name));

    let similar = similar_tasks(name, &tasks_for_error);
    if !similar.is_empty() {
        err_msg.push_str("\n\nDid you mean one of these?");
        for task_name in similar {
            err_msg.push_str(&format!("\n  - {}", task_name));
        }
    }

View on GitHub (pinned to 533346cc37)