Unable to bind durable objects on Remix + Vite project
Hello, I'm trying to incorporate a durable object into my project that I have recently moved to Vite (from the classic Remix compiler). However I think this issue may be more relevant to Wrangler due to the nature of the error. I'm on MacOS and using Node 21.6.2.
When running
wrangler types
(which in turn runs my Vite build process):
service core:user:__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER: Worker "core:user:__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER"'s binding "BasicDurableObject" refers to a service "core:user:worker", but no such service is defined.
Am I defining my binding incorrectly? I don't really understand what to do with this information and I couldn't find anything online.
My object, which is exported from my main
file:
binding: 3 Replies
@shay did you ever figure this out?
No, I ended up shelving this and staying on the classic app server :( sorry
in remix+vite+workers , it could be work
use build and wrangler dev to run it in local to debug this part
export class WSWorker implements DurableObject {
constructor(state, env) {
}
async fetch(request) {
return new Response(undefined, { status: 204 });
}
}
and in local develop, can not use remix vite:dev to run it .use build and wrangler dev to run it in local to debug this part