allevo
CDCloudflare Developers
•Created by allevo on 11/9/2023 in #workers-help
Cannot create binding for class DurableObject2 that is not exported by the script [code: 10061]
I'm editing an old version of my CloudFlare worker to add a new Durable Object called DurableObject2
When I try to deploy it, this is the error:
As you can see, the
dist/index.js
exports the class correctly:
In my src/index.ts there're those 2 lines:
The wrangler.staging.toml file is like:
I also debug which content is uploaded to PUT https://api.cloudflare.com/client/v4/accounts/wwwwwww/workers/scripts/kkkkkk?include_subdomain_availability=true&excludeScript=true
, and it exports correctly the classes at the end of the content:
It works if I remove all the references to DurableObject2, keeping just DurableObject. Where do I make the mistake?
wrangler: 3.15.0
system: MacOs3 replies