CircleCI "Cannot find a job named X" workflow error
A workflow referenced a job that does not exist. CircleCI compiles workflows against the jobs block, and a name that is not defined there (or is misspelled) fails compilation.
What this error means
Config processing fails with "Error calling workflow [name]" and "Cannot find a job named [X] to depend on" or simply "Cannot find a job named [X]".
CircleCI
Error: config compilation contained errors:
* Error calling workflow: 'ci'
* Cannot find a job named 'unit-tests' to depend onCommon causes
The job is not defined or is misspelled
The workflow lists unit-tests but the jobs key defines unit_test (or nothing), so the reference is dangling.
A requires entry names a non-existent job
A requires: dependency points at a job name that is not in the workflow, breaking the dependency graph.
How to fix it
Match workflow job names to definitions
- List the keys under
jobsand compare to the names in the workflow. - Fix the typo or define the missing job.
- Ensure every
requires:entry names a job in the same workflow.
.circleci/config.yml
jobs:
unit-tests:
docker: [{image: cimg/node:20.11}]
steps: [checkout, {run: npm test}]
workflows:
ci:
jobs:
- unit-testsValidate the compiled workflow
Process the config so workflow-to-job mismatches surface before the pipeline runs.
Terminal
circleci config validateHow to prevent it
- Keep job names identical between
jobsandworkflows. - Avoid mixing hyphen and underscore styles in job names.
- Validate config so dangling job references fail at push time.
Related guides
CircleCI "config has no workflows" / no jobs runFix CircleCI pipelines where no jobs run because the config defines no workflows - in 2.1 every job must be r…
CircleCI "Cannot find a definition for executor named X" errorFix CircleCI "Cannot find a definition for executor named X" - a job references an executor that is not decla…
CircleCI "Config does not conform to schema" errorFix CircleCI "Config does not conform to schema" - the YAML parses but a key is unknown, mistyped, or has the…