Deno "Task not found" in CI
You ran deno task <name> but Deno could not find that task. It is not defined in the tasks section of deno.json/deno.jsonc, or Deno resolved a different config file than the one you edited.
What this error means
deno task build (or similar) fails with "Task not found: build" and lists the tasks Deno does know about. It happens after a rename, or when the config file is not where Deno looks.
Task not found: build
Available tasks:
- test
- lintCommon causes
Task missing from the config
The task name is not under tasks in deno.json/deno.jsonc - a typo, a rename, or never defined.
Deno reading a different config
Deno walks up for a config file; if CI runs from a subdirectory or a different config is discovered first, your task may not be in the one it loaded.
How to fix it
Define the task and confirm the config
Add the task and list tasks to confirm Deno sees the right config.
// deno.json
{
"tasks": {
"build": "deno run -A scripts/build.ts"
}
}
// then verify:
// deno task (lists available tasks)Point Deno at the explicit config
In CI, pass the config path so there is no ambiguity about which file Deno loads.
deno task --config ./deno.json buildHow to prevent it
- Keep tasks defined in a single committed
deno.json/deno.jsonc. - Run
deno task(no name) in CI to confirm available tasks. - Pass
--configwhen CI runs from a non-root directory.