nikivdev/code · error
Project '{}' not found. Use `f projects` to see registered p
Error message
Project '{}' not found. Use `f projects` to see registered projects. What it means
show_task_logs resolves the target project from the --project flag; resolve_project returns None when the name is not in the registered-projects store, so the command bails with this message pointing at `f projects` for discovery. It prevents showing logs for a project the tool has never registered.
Source
Thrown at src/processes.rs:299
if let Some(ref task_id) = opts.task_id {
return show_hub_task_logs(task_id, opts.follow);
}
if opts.list {
return list_available_logs(opts.all);
}
if opts.all {
return show_all_logs(opts.lines);
}
// Resolve project: --project flag > flow.toml in cwd > active project
let (project_root, config_path, project_name) = if let Some(ref name) = opts.project {
// Explicit project name
match projects::resolve_project(name)? {
Some(entry) => (entry.project_root, entry.config_path, Some(entry.name)),
None => {
bail!(
"Project '{}' not found. Use `f projects` to see registered projects.",
name
);
}
}
} else if opts.config.exists() {
// flow.toml in current directory
let (cfg_path, cfg) = tasks::load_project_config(opts.config.clone())?;
let canonical = cfg_path.canonicalize().unwrap_or_else(|_| cfg_path.clone());
let root = cfg_path
.parent()
.unwrap_or(Path::new("."))
.canonicalize()
.unwrap_or_else(|_| cfg_path.parent().unwrap_or(Path::new(".")).to_path_buf());
(root, canonical, cfg.project_name)
} else if let Some(active) = projects::get_active_project() {
// Fall back to active project
match projects::resolve_project(&active)? {View on GitHub (pinned to a747e741ae)
Solutions
- Run `f projects` to list registered names and use one of those exactly.
- Register the project (run a task inside it or the projects register command) before fetching logs.
- Drop the -p flag and run from inside the project directory so resolution falls back to flow.toml in cwd.
Defensive patterns
Strategy: validation
Validate before calling
// resolve the project name before calling logs
let names = list_projects()?;
if !names.iter().any(|p| p == requested) {
eprintln!("unknown project '{requested}'; registered: {names:?}");
std::process::exit(1);
} Try / catch
match show_task_logs(opts) {
Ok(()) => (),
Err(e) if e.to_string().contains("not found. Use `f projects`") => {
eprintln!("{e}"); // then list: f projects
std::process::exit(1);
}
Err(e) => return Err(e),
} Prevention
- Run `f projects` to confirm the exact registered name before -p.
- Register a project immediately after cloning/renaming it.
- Avoid hardcoding project names in scripts; resolve them dynamically.
When it happens
Trigger: `f logs -p <name>` (or opts.project set) where the name matches no registered project entry — misspelling, project removed from the registry, or never registered because tasks were only run elsewhere.
Common situations: Typo in the project name, referencing a project after its registration was cleaned up, running on another machine/checkout where the project was never registered, or renaming the project directory without re-registering.
Related errors
- Session '{}' not found in saved sessions
- Project not found. Create it with `f env push` first.
- Key '{}' not found
- No running process found for task '{}'
- Active project '{}' not found. Use `f projects` to see regis
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/05d8af9788f46854.
Report an issue: GitHub.