Skip to content
Latchkey

Nx "The project does not exist" - Fix Project Resolution in CI

Nx could not find a project by the name you passed. The name is not in the project graph - it was renamed, its project.json is missing or malformed, or the directory is outside the configured workspace layout.

What this error means

An nx run <project>:<target> or --projects=<name> command fails with "The <name> project does not exist in this workspace". Nx lists known projects but yours is not among them. Reproducible locally with the same workspace.

Nx output
NX   The "payments" project does not exist in this workspace.

Common causes

Project renamed or not registered

The name in project.json differs from what you invoke, or the project was renamed without updating callers and CI scripts.

Missing or unreadable project.json

A project without a discoverable project.json (or package.json with an Nx-recognized shape) is not added to the graph, so its name never resolves.

Outside the workspace layout / globs

Nx discovers projects under configured locations. A project in a directory not covered by the workspace globs is simply never seen.

How to fix it

List the projects Nx actually knows

Confirm the canonical name and that the project is in the graph at all.

Terminal
nx show projects
# narrower
nx show projects --projects=payments*

Fix the name or add the project config

  1. Match the invoked name to the name field in the project’s project.json.
  2. If project.json is missing, add one with a name and at least one target.
  3. Ensure the project directory is within the workspace’s configured project locations.

Reset the graph after structural changes

Terminal
nx reset
nx show projects   # confirm it now appears

How to prevent it

  • Keep the name in project.json stable and update all callers when renaming.
  • Add a CI step that runs nx show projects to catch missing registrations early.
  • Reset the Nx cache after large refactors that move project directories.

Related guides

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