Try adding the `rpc` compatibility flag
Try adding the
rpc
compatibility flag into your Wrangler.json11 Replies
The compatibility flag rpc became the default as of 2024-04-03 so does not need to be specified anymore.
But it did change the error that was sent, let me read through itMight be a lack of RPC support at all in the Vitest environment currently
https://github.com/cloudflare/workers-sdk/issues/5386 refers to https://github.com/cloudflare/workers-sdk/pull/5508 which isn't merged yet
This wrapping will need to be updated for JSRPC. In particular, we need to make sure RPC methods can still be called on WorkerEntrypoint default exports, and DurableObject subclasses
Darn, that's a shame... Thanks for finding that
Installing the PR is still causing the same errors, so doesn't look like it's totally resolved yet
As in checking out the PR and building vitest-pool-workers yourself?
No I was using the prerelease in the github actions bot message
Oh that message only includes wrangler
If you expand the 'additional artifacts' there should be a Vitest one (which I wasn't aware of until I checked with someone else)
WOAH it works 🙂
Thanks @kian !
Credit to @James, I spent all this time trying to build it myself since I didn't think there was prereleases for Vitest
:notlikemeow:
I did exactly the same lol
Hah yeah it's tucked under that little section there. I only knew because of early testing. Glad you were able to use it! 😄