---
description: Learn how to troubleshoot common and known issues in Workers Builds.
title: Troubleshooting builds
image: https://developers.cloudflare.com/workers/ci-cd/builds/troubleshoot/og.png?v=bea231c9b08a06d4
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt  
> Use this file to discover all available pages before exploring further.

# Troubleshooting builds

Last updated Nov 8, 2026|Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/workers/ci-cd/builds/troubleshoot/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

This guide explains how to identify and resolve build errors, as well as troubleshoot common issues in the Workers Builds deployment process.

To view your build history, go to your Worker project in the Cloudflare dashboard, select **Deployment**, select **View Build History** at the bottom of the page, and select the build you want to view. To retry a build, select the ellipses next to the build and select **Retry build**. Alternatively, you can select **Retry build** on the Build Details page.

Builds and their build logs are retained for 90 days after they finish. Refer to [Limits & pricing](https://developers.cloudflare.com/workers/ci-cd/builds/limits-and-pricing/).

## Known issues or limitations

Here are some common build errors that may surface in the build logs or general issues and how you can resolve them.

### Workers name requirement

`✘ [ERROR] The name in your Wrangler configuration file (<Worker name>) must match the name of your Worker. Please update the name field in your Wrangler configuration file.`

When connecting a Git repository to your Workers project, the specified name for the Worker on the Cloudflare dashboard must match the `name` argument in the Wrangler configuration file located in the specified root directory. If it does not match, update the name field in your Wrangler configuration file to match the name of the Worker on the dashboard.

The build system uses the `name` argument in the Wrangler configuration file to determine which Worker to deploy to Cloudflare's global network. This requirement ensures consistency between the Worker's name on the dashboard and the deployed Worker.

Note

This does not apply to [Wrangler Environments](https://developers.cloudflare.com/workers/wrangler/environments/) if the Worker name before the `-<env_name>` suffix matches the name in the Wrangler configuration file.

For example, a Worker named `my-worker-staging` on the dashboard can be deployed from a repository that contains a Wrangler configuration file with the arguments `name = my-worker` and `[env.staging]` using the deploy command `npx wrangler deploy --env staging`. On Wrangler v3 and up, Workers Builds automatically matches the name of the connected Worker by overriding it with the `WRANGLER_CI_OVERRIDE_NAME` environment variable.

### Missing Wrangler configuration file

`✘ [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. wrangler deploy path/to/script) or the main config field.`

If you see this error, a Wrangler configuration file is likely missing from the root directory. Navigate to **Settings** > **Build** > **Build Configuration** to update the root directory, or add a [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/configuration/) to the specified directory.

### Incorrect account\_id

`Could not route to /client/v4/accounts/<Account ID>/workers/services/<Worker name>, perhaps your object identifier is invalid? [code: 7003]`

If you see this error, the Wrangler configuration file likely has an `account_id` for a different account. Remove the `account_id` argument or update it with your account's `account_id`, available in **Workers & Pages Overview** under **Account Details**.

### Stale API token

`Failed: The build token selected for this build has been deleted or rolled and cannot be used for this build. Please update your build token in the Worker Builds settings and retry the build.`

The API Token dropdown in Build Configuration settings may show stale tokens that were edited, deleted, or rolled. If you encounter an error due to a stale token, create a new API Token and select it for the build.

### Build timed out

`Build was timed out`

There is a maximum build duration of 20 minutes. If a build exceeds this time, then the build will be terminated and the above error log is shown. For more details, see [Workers Builds limits](https://developers.cloudflare.com/workers/ci-cd/builds/limits-and-pricing/).

### Build succeeds but the site returns a 404 or blank page

If the build and deployment succeed but requests to your Worker return a `404` or an empty page, the deployed Worker is likely serving a directory that does not contain your built site. Check that:

- The build command in **Settings** > **Build** > **Build Configuration** runs your framework's build step (for example, `npm run build`).
- The [`assets.directory`](https://developers.cloudflare.com/workers/static-assets/binding/#directory) in your Wrangler configuration file points to the folder your build writes to (for example, `./dist` or `./build`).
- For a single-page application, [`assets.not_found_handling`](https://developers.cloudflare.com/workers/static-assets/routing/single-page-application/) is set to `single-page-application` so that client-side routes do not return `404`.

### `npm ci` reports that `package.json` and `package-lock.json` are out of sync

``npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.``

If this error appears in Workers Builds but `npm ci` works on your machine, your lockfile was probably written by a newer npm version than the build image's default. Workers Builds does not use the `engines.npm` field to choose an npm version. To use the same npm version as your local machine, set the [`packageManager`](https://developers.cloudflare.com/workers/ci-cd/builds/build-image/#package-manager-versions) field in your `package.json` to an exact version, for example `"packageManager": "npm@11.19.1"`. To check your local npm version, run `npm -v`.

### Pull request comment shows "No Preview URL"

A preview build can succeed while the pull request or merge request comment shows **No Preview URL**. This means Workers Builds did not receive a Preview URL from your Preview command. Check the following:

1. **A Preview host is enabled.** Your Worker needs a custom domain enabled for Preview traffic, `workers.dev` Preview URLs, or both. You do not need `workers.dev` if a custom domain is enabled for Previews. To enable a host, refer to [Custom domains](https://developers.cloudflare.com/workers/previews/custom-domains/).
2. **Your Preview command reports the Preview to Workers Builds.** Workers Builds reads Preview and Deployment URLs from the output of the [Preview command](https://developers.cloudflare.com/workers/ci-cd/builds/configuration/#preview-command). Use one of these commands:

   | Command | Minimum version |
   | --- | --- |
   | `npx wrangler preview` | Wrangler 4.135.0 |
   | `npx cf previews deploy` | `cf` 1.0.0-beta.18 |

   Earlier versions of `cf previews deploy` print the Preview URLs in the build log but do not report them to Workers Builds. Update the version in your `package.json`.

To confirm the Preview was created, find its URLs in the build log or in the **Previews** section of your Worker.

### Git integration issues

If you are running into errors associated with your Git integration, you can try removing access to your [GitHub](https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/github-integration/#removing-access) or [GitLab](https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/gitlab-integration/#removing-access) integration from Cloudflare, then reinstalling the [GitHub](https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/github-integration/#reinstall-a-git-integration) or [GitLab](https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/gitlab-integration/#reinstall-a-git-integration) integration.

## Builds API errors

These errors are returned by the [Builds API](https://developers.cloudflare.com/workers/ci-cd/builds/api-reference/).

### "Resource not found" error

You are likely using the Worker name instead of the Worker tag. The Builds API requires the `tag` (a UUID like `1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d`), not the Worker name. Refer to [Get your Worker tag](https://developers.cloudflare.com/workers/ci-cd/builds/api-reference/#get-your-worker-tag).

### "Invalid request body" (12002) when updating branch patterns

The [`PATCH /builds/triggers/{trigger_uuid}`](https://developers.cloudflare.com/api/resources/workers_builds/subresources/triggers/methods/update/) endpoint returns this error when the trigger's resulting `branch_includes` and `branch_excludes` are not one of these combinations:

| Trigger | `branch_includes` | `branch_excludes` |
| --- | --- | --- |
| Production | One branch name without wildcards (for example, `["main"]`) | Empty (`[]`) |
| Legacy branch builds (non-production) | `["*"]` | One or more branch names without wildcards |

The error is also returned if the update would change a production trigger into a non-production trigger, or the other way around. Branch patterns such as `feature/*` are not supported.

To change your production branch, [update `git_repository.branch`](https://developers.cloudflare.com/workers/ci-cd/builds/api-reference/#update-build-settings) instead.

## For additional support

If you discover additional issues or would like to provide feedback, reach out to us in the [Cloudflare Developers Discord ↗︎](https://discord.com/channels/595317990191398933/1052656806058528849).

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/ci-cd/builds/troubleshoot/#page","headline":"Troubleshooting builds","description":"Learn how to troubleshoot common and known issues in Workers Builds.","url":"https://developers.cloudflare.com/workers/ci-cd/builds/troubleshoot/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/ci-cd/builds/troubleshoot/og.png?v=bea231c9b08a06d4","dateModified":"2026-11-08","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
