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.
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
- List your Pages projects to get the exact name.
- Pass that name to the deploy command or set it in wrangler config.
- Confirm CLOUDFLARE_ACCOUNT_ID matches the account that owns the project.
npx wrangler pages project list
npx wrangler pages deploy ./dist --project-name my-siteCreate the project first if it does not exist
On a fresh account the project must be created before the first deploy.
npx wrangler pages project create my-site --production-branch mainHow 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.