I tried Workers Paid for a few months to experiment with Durable Objects, and it’s super cool tech but didn’t end up meeting my use case. I have a few workers leftover that have Durable Object classes still associated with them, however even though they exist I can’t delete them without deleting the objects first:
When I try to overwrite the worker with one that doesn’t include the durable object, I get this error:
PS C:\Users\kaytw\repos\workers-chat-demo> wrangler publish
✨ No build command specified, skipping build.
New version of script does not export class ChatRoom which is depended on by existing Durable Objects. Did you forget to include it? If you renamed it, try a rename-class migration. If you want to delete all the Durable Objects implemented by the class, you can use a delete-class migration [API code: 10064]
And when I try to explicitly delete the Durable Object class I get this error:
PS C:\Users\kaytw\repos\workers-chat-demo> wrangler publish --delete-class ChatRoom
✨ No build command specified, skipping build.
Error: Something went wrong with the request to Cloudflare...
Your account does not have permission to do this! While Durable Objects are in Beta, the modules format is limited to accounts which have opted-in to the Beta. You may do so
by following the instructions here: https://developers.cloudflare.com/workers/learning/using-durable-objectsworkers.api.error.not_entitled [API code: 10015]
Is there any way for me to delete these Durable Objects, or otherwise just delete these workers, while downgraded to the free workers plan? Thanks!
In the web ui: script still in use by a durable object namespace (Code: 10064)
using cli:
PS C:\Users\kaytw\repos\workers-chat-demo> wrangler publish
✨ No build command specified, skipping build.
Error: Something went wrong with the request to Cloudflare...
New version of script does not export class ChatRoom which is depended on by existing Durable Objects. Did you forget to include it? If you renamed it, try a rename-class migration. If you want to delete all the Durable Objects implemented by the class, you can use a delete-class migration [API code: 10064]
PS C:\Users\kaytw\repos\workers-chat-demo> wrangler publish --delete-class ChatRoom
✨ No build command specified, skipping build.
Error: Something went wrong with the request to Cloudflare...
New version of script does not export class ChatRoom which is depended on by existing Durable Objects. Did you forget to include it? If you renamed it, try a rename-class migration. If you want to delete all the Durable Objects implemented by the class, you can use a delete-class migration [API code: 10064]
PS C:\Users\kaytw\repos\workers-chat-demo>