Vite with WorkerEntrypoint (RPC)

I'm trying to run Hono app on Vite as Cloudflare Worker. I'm using @cloudflare/vite-plugin and I'm getting following error when vite serve: Worker "core:user:minerva-gateway"'s binding "AUTH_SERVICE" refers to a service "core:user:minerva-auth", but no such service is defined. The problem might be because I use WorkerEntrypoint (to enable RPC), does Vite support it? If so, where should I define the service?
2 Replies
korinne
korinne2d ago
Hi! Do you have something I could repro to see the error myself? I'm going to assume you're using standing up an auth service on one Worker, and trying to communicate to that Worker from another service using a service binding (via WorkerEntrypoint). Is that accurate? If so, here's an example of how to have multiple workers with the Vite plugin: https://github.com/cloudflare/workers-sdk/tree/main/packages/vite-plugin-cloudflare/playground/multi-worker Let me know if you're attempting something else, and would love to help!
GitHub
workers-sdk/packages/vite-plugin-cloudflare/playground/multi-worker...
⛅️ Home to Wrangler, the CLI for Cloudflare Workers® - cloudflare/workers-sdk
w7a9q
w7a9qOP18h ago
Thanks! That'll do.

Did you find this page helpful?