Cannot create binding for class DurableObject that is not exported by the script [API code: 10061]

I’m trying to deploy a worker with a new DurableObject binding.

[durable_objects]
bindings = [{name = “DurableChat”, class_name = “DurableChat”}]

But I’m running into an error where its saying the class is not being exported by the script and thus cannot create the binding…

Cannot create binding for class DurableChat that is not exported by the script [API code: 10061]

As you can see below the class is definitely being exported by the script.
image

So I’m lost as to what’s actually causing the error. Any ideas?

Updating for anyone who runs into this issue. When creating a new class the wrangler publish command needs to include --new-class ClassName where ClassName is the name of the class.

This is not mentioned in the error returned

1 Like

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