Unable to bind workers to each other locally when using @cloudflare/vite-plugin

I've been trying to do the work to move to the cloudflare vite plugin. I've got most of the way there, the only remaining issue is that I can't seem to use multiple workers together locally. My setup is - A React Router v7 app - An API worker The RR7 app already uses vite. So far I've been able to successfully use wrangler dev for the API and service bindings in the RR7 app to connect to the worker. Locally, as long as I start the api worker before the webapp, everything seems to connect just fine. However, moving to cloudflare vite plugin, when I try to connect to the worker via fetch bindings, I get this error, meaning there is something wrong with the binding.
SyntaxError: Unexpected token 'w', "[wrangler] "... is not valid JSON
SyntaxError: Unexpected token 'w', "[wrangler] "... is not valid JSON
Would really appreciate some help here. Thank you.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?