Skip to content
Latchkey

Cloudflare Pages deploy "project not found" in CI

wrangler authenticated but could not find the Pages project: "Project not found" means the project name passed to wrangler pages deploy does not exist under the account the token belongs to, usually a name typo or a token for the wrong account.

What this error means

wrangler pages deploy fails with "Project not found. The specified project name does not match any of your existing projects." The auth succeeded, so it is not a token problem.

wrangler
X [ERROR] Project not found. The specified project name does not match any of your existing projects.

Common causes

The project name is misspelled or missing

The --project-name value (or the name in wrangler config) does not match an existing Pages project exactly, so wrangler reports it as not found.

The token belongs to a different account

The project exists under one account, but CLOUDFLARE_ACCOUNT_ID or the token points at another account that has no such project.

How to fix it

Pass the exact existing project name

  1. List your Pages projects to get the exact name.
  2. Pass that name to the deploy command or set it in wrangler config.
  3. Confirm CLOUDFLARE_ACCOUNT_ID matches the account that owns the project.
Terminal
npx wrangler pages project list
npx wrangler pages deploy ./dist --project-name my-site

Create the project first if it does not exist

On a fresh account the project must be created before the first deploy.

Terminal
npx wrangler pages project create my-site --production-branch main

How to prevent it

  • Store the project name once and reuse it across deploy steps.
  • Keep CLOUDFLARE_ACCOUNT_ID aligned with the token and project.
  • Run pages project list in a preflight to catch name drift.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →