Nx "Cannot find configuration for task" in CI
Nx was asked to run a target on a project that has no such target. The name is wrong, the target is missing, or the cached graph has not picked up a project.json change.
What this error means
An nx run or nx affected invocation aborts with "Cannot find configuration for task <project>:<target>". Nothing runs; the same command fails the same way each time.
nx
NX Cannot find configuration for task api:build
Pass --verbose to see the stacktrace.Common causes
Target not defined on the project
The project.json or inferred plugin config has no target with that name, so Nx cannot map the task.
Typo in project or target name
Nx names are exact and case-sensitive; api:Build and api:build are different tasks.
Stale project graph cache
A project.json change is not reflected in the cached graph or daemon, so a new target is invisible.
How to fix it
List the project real targets
- Show the targets that actually exist on the project.
- Match the invoked name exactly.
Terminal
nx show project api --json | jq '.targets | keys'Reset the graph if stale
- Clear the cached graph and daemon, then re-run.
Terminal
nx reset
nx run api:buildHow to prevent it
- Reference targets by their exact lowercase names and run nx reset after restructuring projects.
Related guides
Nx "The project does not exist" in CIFix Nx "The X project does not exist in this workspace" in CI. The project was renamed, has no project.json,…
Turborepo "command not found in pipeline" in CIFix Turborepo "command X not found" in CI. The task is not defined under tasks (or pipeline) in turbo.json, o…
Nx Daemon process error in CIFix Nx "Daemon process error" / terminated in CI. The background Nx daemon crashed or could not start, usuall…