OK I have read through the last three

OK, I have read through the last three months of discord and searched, and am still coming up empty.

I am using itty-router-openapi to serve paths. I have only been getting KV pairs and that seems to work just fine in my worker. I would like to get a Durable Object called User:

durable_objects.bindings = [
  { name = "USER", class_name = "User" }
]

[[migrations]]
tag = "v2"
new_classes = ["User"]


My routing code is in a file called "index.mts" where the User Object itself is stored in the following path:

/paths/Durables/User

I have imported the User Object in to index.mts:

import {User} from "./paths/Durables/User";

I have exported that same file from the same piece of code:

export {User} from "./paths/Durables/User"
I have exported the class from the file itself:

export default class User extends createDurable({ autoReturn: true }) {

I keep getting the same error:

Cannot create binding for class User that is not exported by the script
Was this page helpful?