Error: Dynamic require of "node:stream" is not supported when using the @supabase/supabase-js client

I'm trying to use supabase client in my Hono API with cloudflare workers and I can't run the worker because of this error. node version: v21.1.0 wrangler.toml: compatibility_flags = [ "nodejs_compat" ] compatibility_date = "2024-09-23" Can anyone help with this? Is it even possible to use the supabase client?
1 Reply
Chaika
Chaika2mo ago
that's an interesting error, if you 🔍 there's been some people saying they've got it to work before and even an integration: https://developers.cloudflare.com/workers/databases/native-integrations/supabase/. You have the option to use Hyperdrive instead: https://developers.cloudflare.com/hyperdrive/examples/supabase/ and connect directly w/ postgres driver, it does caching/conn pooling for you
Cloudflare Docs
Supabase | Cloudflare Workers docs
Supabase ↗ is an open source Firebase alternative and a PostgreSQL database service that offers real-time functionality, database backups, and extensions. With Supabase, developers can quickly set up a PostgreSQL database and build applications.
Cloudflare Docs
Connect to Supabase | Hyperdrive
Connect Hyperdrive to a Supabase Postgres database.
Want results from more Discord servers?
Add your server