Skip to content
Latchkey

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 on

Common 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

  1. List the keys under jobs and compare to the names in the workflow.
  2. Fix the typo or define the missing job.
  3. 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-tests

Validate the compiled workflow

Process the config so workflow-to-job mismatches surface before the pipeline runs.

Terminal
circleci config validate

How to prevent it

  • Keep job names identical between jobs and workflows.
  • Avoid mixing hyphen and underscore styles in job names.
  • Validate config so dangling job references fail at push time.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →