Can't access RPC Service Bindings in local (next dev)
i'm trying to access a Service binding (RPC) in my Next-on-Pages. My wrangler.toml looks like this:
When I call it like this, running
next dev
:
It does not throw this error, indicating that the binding was found, but I get the following warning regarding RPC:
The "Image Search" is defined in my worker like this:
It does work when running wrangler pages dev .vercel/output/static --service VECTORIZE_WORKER=vectorize-worker --compatibility-flag=nodejs_compat"
alongside the service worker running via wrangler dev
It does not work (and throws the error above) when running next dev
Is it possible to make rpc service bindings work via next dev? Also since my vectorize worker do access Vectorize, it will only work via wrangler dev --remote
which is then further incompatible with this local testing?3 Replies
@thipperz — what is the compatibility date of the Pages project? This error suggests that you have the wrong compat date being set:
@Brendan Irvine-Broque that message appears even after I updated the compat date or added the 'rpc' compat flag in my wrangler.toml
Seems like something else is going on
GitHub
🐛 BUG: Miniflare's
getBindings
does not properly expose RPC entry...Which Cloudflare product(s) does this pertain to? Miniflare What version(s) of the tool(s) are you using? [email protected] What version of Node are you using? 20 What operating system and ver...