cf-binding-proxy with sveltekit for HMR

I'm using cf-binding-proxy, drizzle ORM, and Sveltekit. I'm using "npx cf-binding-proxy --d1=db" and "npm run dev" at the same time. This is to use HMR of sveltekit. The cf-binding-proxy part continues to rebuild every time the file modifies, making it difficult to access from the npm run dev server. Is there a similar problem or any workaround?
6 Replies
sikmin
sikmin5mo ago
Rebuilds create the error "Error: EBUSY: resourcebusy or locked," which makes it inaccessible on the npm run dev server.
James
James5mo ago
cf-bindings-proxy does not build stuff. Not sure what you mean by it rebuilds when a file is modified?
sikmin
sikmin5mo ago
Yes sir. I've moved from Vercel to CF. I'm at a loss because I can't use HMR. Is there a way to solve it?
James
James5mo ago
well i still dont understand what is supposed to be rebuilding cf-bindings-proxy isn't a build tool
sikmin
sikmin5mo ago
However, every time I modify the file, it is rebuilt. [wrangler:inf] POST / 200 OK (9ms) [wrangler:inf] POST / 200 OK (3ms) The file src\routes\-----\+page.svelte changed, restarting build... Running custom build: npm run build ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ test@0.0.1 build vite build vite v5.0.11 building SSR bundle for production...
James
James5mo ago
that's your dev server, not cf-bindings-proxy