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"]
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
PS
Paul Shriner226d ago
Worth noting, when I start wrangler dev, I get the following error: service core:user:worker: Uncaught ReferenceError: src_exports is not defined
HIA
Hello, I’m Alastair!226d ago
Do you have a repo I can check out?
PS
Paul Shriner226d ago
Let me create one
PS
Paul Shriner226d ago
GitHub
GitHub - shrinerp/CF-Proxy
Contribute to shrinerp/CF-Proxy development by creating an account on GitHub.
PS
Paul Shriner226d ago
I left all of my extra imports in there, but removed the "path" that I tried in my durable object binding.
HIA
PS
Paul Shriner226d ago
I tried that in both index.mts and UserLookup where the object is used. The error points back to the binding. Cannot create binding for class User that is not exported by the script [code: 10061] Which if the class isn't exporting, then CF won't know what to do with it. Made some progress, I changed the binding to v3 That was the issue. Thanks for everyone help looking into this.
Want results from more Discord servers?
Add your server
More Posts
/Module/HTML.html fails to open but /Module/HTML2.html opens successfully.I have two pages hosted on Cloudflare Pages, static no functions. This one opens successfully https:Domain not verifyingHey, I registered a domain, and set the nameservers to cloudflare. After a couple days, it still shUpload files using CF Pages with Remix (multipart form)Remix needs `unstable_createFileUploadHandler` to be able to extract files from form data, but I canDegraded routing on free plan?Hi. We have some Web APIs running on Cloudflare's Pro plan and now a new API running on the free plapostgres orm drizzle setup can not be bundled by rollupI've used the cloudflare pages template for qwik ( https://developers.cloudflare.com/pages/frameworkyou have been locked outHI! I am using a tunnel to my homeserver for a couple of websites. I don't know why but for only 1 oStripe with Remix 2.0I'm using Stripe with Remix on CF Pages, using this configuration: ```` export const stripe = (stristuckWebsite stuck problem in ipadstuckWebsite stuck in ipad please fix this prblem I'm clicking on login it's stuck so many timesUnable to buy advanced certificate managerHey, I'm trying to purchase Advanced Certificate Manager. Cloudflare already has my billing info butWhat to do if cloudflare blocked me from using the discord site in error?i am not sure what happend because i do not recall doing any bad activity and i really want to use mR2 CDNIs R2 worker cache is the same as Cloudflare CDN? How can I add cloudflare cdn in front of my privHow do I get ASN of connecting user? Similar to CF-Connecting-IP?Title says it all, thanks!Is 10MB a hard limit for images?I'm considering using cloudflare images, but I'll need to support images up to 50mb (and keep the orR2 temporary token for a bucketHey, I'm coming with an AWS background. I'm trying R2 out and need help. How can I let the user inredirect to instagram profile?How can i redirect to a Instagram Site when i type: instagram.website.comIs there a way to report an error so metrics and logs show it as "not OK"Today we are catching all errors and logging them ( with logpush, etc ) return new Response("ServerCant Upload Sender Gmail Profil PictureI Created Business Email (on cloudflare website) , and connected it to my Gmail Address , and I spenProblem 404 Not Found | openresty on my domain without www versionHi Experts I get 404 Not Found | openresty after super fast window redirect and please wait when i Proxy/tunnel subdomain to hide IPIs it possible? I tried adding a subdomain from dedyn.io as a website to Cloudflare, got it activate