supabase / supabase-js

An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
https://supabase.com
MIT License
2.92k stars 224 forks source link

Failing build with the latest version at 2.38.4 #897

Open y471n opened 7 months ago

y471n commented 7 months ago

Bug report

Qwik's build fails with the latest version of Supabase. Earlier running v2.33.2 was fine.

Describe the bug

On running npm run build, getting the following error:

RollupError: Cannot bundle Node.js built-in "stream" imported from "node_modules/@supabase/node-fetch/lib/index.js". Consider disabling ssr.noExternal or remove the built-in dependency.

To Reproduce

This does not happen in a new project. In my own project I've various Supabase client calls within Promise.all. I think that's the culprit.

Expected behavior

The build should work.

Screenshots

Screenshot 2023-11-01 at 10 39 41 AM

System information

Additional context

This didn't happen in a new project I tried to create to reproduce the problem, where I didn't use the Promise.all with supabase queries in it.