Workers compatibility date issue

Error I encountered

I ran npm run start and got the following output:

⎔ Starting local server...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-08-14",
but you've requested "2023-08-21". Falling back to "2023-08-14"...
[mf:inf] Ready on http://127.0.0.1:8787/
[mf:inf] GET / 200 OK (5ms)
[mf:inf] GET /favicon.ico 200 OK (1ms)

Additional information

How I got started with this project?

I ran npm create cloudflare@latest and here is the console output:

using create-cloudflare version 2.1.1

╭ Create an application with Cloudflare Step 1 of 3
│
├ In which directory do you want to create your application?
│ dir ./abcd
│
├ What type of application do you want to create?
│ type "Hello World" Worker
│
├ Do you want to use TypeScript?
│ no typescript
│
├ Copying files from "hello-world" template
│
├ Do you want to use TypeScript?
│ no typescript
│
├ Retrieving current workerd compatibility date
│ compatibility date 2023-08-21
│
╰ Application created

╭ Installing dependencies Step 2 of 3
│
├ Installing dependencies
│ installed via `npm install`
│
╰ Dependencies Installed

╭ Deploy with Cloudflare Step 3 of 3
│
├ Do you want to deploy your application?
│ no deploy via `npm run deploy`
│
├  APPLICATION CREATED  Deploy your application with npm run deploy
│
│ Navigate to the new directory cd cf-nerdsid-stats
│ Run the development server npm run start
│ Deploy your application npm run deploy
│ Read the documentation https://developers.cloudflare.com/workers
│ Stuck? Join us at https://discord.gg/cloudflaredev
│
╰ See you again soon!

System, Node, NPM version

I’m on Windows 10, 64 bit with:

node -v
v20.5.0
npm -v
9.8.0

I see no errors @Sid_r

By ‘error’, I am referring to the warning:

[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-08-14",
but you've requested "2023-08-21". Falling back to "2023-08-14"...

That isn’t an “error” @Sid_r. Not it says mf:wrn or “miniflare warning”. It is a notification informing you that the compatibility date 2023-08-21 set in the wrangler.toml isn’t a runtime release date. Therefore the closest date to the date specified—2023-08-14— is used for compatibility purposes.

This was originally mentioned somewhere in documentation (and better than I have described) but cannot find it now.

I perfectly understood what the warning wants to convey.

But how can the compatibility date 2023-08-21, which was (auto generated) by npm create cloudflare@latest be wrong?

Perhaps it uses the current date when it is executed.

Agreed, this makes very little sense. Advice for years has simply been to use the current date.

Related issues:

1 Like

Thanks @cherryjimbo.

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