Your configuration file is missing compatibility_date..."2021-10-18"

FYI: Error message after running

Your configuration file is missing compatibility_date, so a distant past date is assumed. To get the latest possibly-breaking bug fixes, add this line to your wrangler.toml:

compatibility_date = "2021-10-18"

For more information about compatibility dates, see:

The wrangler.toml file in doesn’t have a compatibility_date set so that error is to be expected.

It would be good to update the instructions on GitHub - juiceo/cloudflare-worker-cra: A fresh CRA project which automatically deploys to Cloudflare Workers with Github Actions. .

After adding the line to the wrangler.toml, the build still fails.

Error: unknown field compatibility_date, expected one of bucket, entry-point, include, exclude

My wrangler.toml file looks like this:

name = “my-worker”
type = “webpack”
workers_dev = true
route = “”
zone_id = “”

bucket = “./build”
entry-point = “workers-site”
compatibility_date = “2021-10-18”

Try moving the compatibility date above [sites]

I suggest you create a pull request if you want it fixed - that repo isn’t maintained by Cloudflare.

It shouldn’t be specified in the [site] section - try this instead:

compatibility_date = "2021-10-18"
name = "my-worker"
type = "webpack"
workers_dev = true

bucket = "./build"
entry-point = "workers-site"

Furthermore, you can deploy the Worker just fine without specifying a compatibility_date in wrangler.toml as Wrangler will just, at least for the time being, assume a distant past date. It is, however, recommended to specify a compatibility_date as you’ll otherwise miss out on the latest fixes.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.