Skip to content

Containers don't work with @cloudflare/vite-plugin #9793

@vanpelt

Description

@vanpelt

What versions & operating system are you using?

Wrangler 4.22.0, Node 22.16.0, MacOS 15.5

Please provide a link to a minimal reproduction

https://github.com/craigsdennis/sandboxing-day-containers

Describe the Bug

Containers don't work in local development with the @cloudflare/vite-plugin. When a container endpoint is attempted to be fetched one gets:

Error: Container is not enabled for this durable object class. Have you correctly setup your wrangler.toml?

I filed a separate ticket in the containers project, but I imagine the root cause is in the vite-plugin.

Please provide any relevant error logs

The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2025-06-17",
but you've requested "2025-06-22". Falling back to "2025-06-17"...

VITE v6.3.5 ready in 524 ms

➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ Debug: http://localhost:5173/__debug
➜ press h + enter to show help
Request received

Getting container demo
Container started

Error: Container is not enabled for this durable object class. Have you correctly setup your wrangler.toml?
at Array. (/Users/vanpelt/Development/sandboxing-day-containers/worker/index.ts:39:18) {
remote: true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't workingcontainers

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions