Skip to content
Latchkey

Nx "Could not find project" in CI

Nx resolved the project graph but the name you passed is not in it. Either the project was never registered (no project.json or package.json Nx recognizes), or the name is misspelled.

What this error means

A command such as nx build web fails with "Cannot find project 'web'" even though the folder exists on disk.

Nx
Cannot find project 'web'

Common causes

The project is not registered in the workspace

Nx discovers projects from project.json / package.json under configured paths. A folder without a recognized manifest is not a project.

The name differs from the folder

The name field in project.json sets the project name; it can differ from the directory you expect to type.

How to fix it

List the real project names

  1. Run nx show projects to see every registered name.
  2. Use the exact name Nx prints, not the folder path.
  3. If the project is missing, add a project.json with a name.
Terminal
nx show projects

Register the project

Add a manifest Nx recognizes so the folder becomes a project in the graph.

apps/web/project.json
{
  "name": "web",
  "sourceRoot": "apps/web/src",
  "projectType": "application"
}

How to prevent it

  • Reference projects by the name Nx reports, not by directory.
  • Ensure every buildable folder has a recognized manifest.
  • Run nx show projects in a CI smoke check when scripting many targets.

Related guides

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