Skip to content

wrangler doesn't recognize a Durable Object namespace exists without a binding #10294

@kentonv

Description

@kentonv

What versions & operating system are you using?

wrangler 4.28.1 on Linux

Please provide a link to a minimal reproduction

No response

Describe the Bug

Say I have this wrangler.jsonc:

{
  "name": "worker",
  "main": "src/index.ts",
  "compatibility_date": "2025-07-01",
  "compatibility_flags": ["experimental"],
  "migrations": [
    {
      "tag": "v0",
      "new_sqlite_classes": [ "MyDurableObject" ]
    }
  ]
}

I've declared via migrations that MyDurableObject is a Durable Object implementation and should have storage attached.

However, wrangler does not actually configure workerd to attach storage to this DO class unless I explicitly declare a binding for it.

With the upcoming ctx.exports API (currently available with the "experimental" compat flag), it will no longer be necessary to declare bindings. But, if workerd does not configure storage for the DO, then it won't show up in ctx.exports. So, currently as a work-around I have to declare a fake binding just to convince Wrangler to configure the storage. Once I do, ctx.exports works.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething that isn't workingquick winPotentially easy/straightforward issue to tackle

Type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions