supabase-js: 2.49.9 breaks application code on Vercel (error 500)
Bug report
Describe the bug
at (../../../../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/browser.js:4:8)
at (../../../../../node_modules/.pnpm/@supabase+realtime-js@2.11.9/node_modules/@supabase/realtime-js/src/RealtimeClient.ts:222:20)
at (../../../../../node_modules/.pnpm/@supabase+realtime-js@2.11.9/node_modules/@supabase/realtime-js/src/RealtimeChannel.ts:218:18)
and the app errors with status 500
To Reproduce
Adding later
Expected behavior
I have updated from 2.49.8
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- Version of supabase-js: [e.g. 2.49.9]
- Version of Node.js: [e.g. 22.X] (vercel)
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 3
- Comments: 48 (8 by maintainers)
Thanks @GBarb0 for reporting that latest
nextversion fixed the warning.We’re working on identifying the issue with realtime subscriptions not firing.
Thanks.
The fix just got released as v2.50.1.
I’m having this same issue with anything above
2.49.8using Solid-Start.Here are my logs when upgrading to either
49.9or50:2.49.8works fine thoughnext.config.ts
today: version 2.49.10 works with this nextconfig
i made a PR: https://github.com/supabase/realtime-js/pull/481
I ask the community for help in analyzing the fetch solution I proposed.
if you consider that new function has strong security implications in spite of being with hardcoded strings, you can ignore it, but if you consider it viable, let me know to upload a new PR
resume:
thank you! that’s an extremely useful discovery! we might need to do the same fix we did for WS but now one for this fetch lib 😓
are you able to provide some example code so we can replica the issue?
also reopening this issue
I had this error too:
v2.50.1-next.6 solved it for me. Would you release a new (intermediate) version back porting the fix?
Works for me! I will do another test alter that day, but looks good so far! ❤️
Hey all, could you you please try out using v2.50.1-next.6 and let me know if that fixes your issue?
Thanks.
I have the exact same thing and need to keep it at 2.49.9 for now
Facing the same issue here:
$ next dev -p 3000 ▲ Next.js 15.3.3
✓ Starting… ✓ Ready in 1292ms ✓ Compiled /middleware in 139ms (244 modules) ○ Compiling /[schema_name] … ⚠ ./node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js Critical dependency: the request of a dependency is an expression
Import trace for requested module: ./node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js ./node_modules/@supabase/realtime-js/dist/main/index.js ./node_modules/@supabase/supabase-js/dist/module/index.js ./node_modules/@supabase/ssr/dist/module/createBrowserClient.js ./node_modules/@supabase/ssr/dist/module/index.js ./utils/supabase/server.ts ./utils/auth.ts ./app/not-found.tsx ⚠ ./node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js Critical dependency: the request of a dependency is an expression
Import trace for requested module: ./node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js ./node_modules/@supabase/realtime-js/dist/main/index.js ./node_modules/@supabase/supabase-js/dist/module/index.js ./node_modules/@supabase/ssr/dist/module/createBrowserClient.js ./node_modules/@supabase/ssr/dist/module/index.js ./utils/supabase/server.ts ./utils/auth.ts ./app/not-found.tsx
I am also getting this same issue in
2.50.0. I have not seen any side-effects yet and it only appears as a warning.With Webpack
with Turbopack
When I run with webpack with the newest version as of today June 5, 2025, I get that error, but when I run with turbopack I don’t get that error.
Then I looked in the code and noticed that it made a curious dynamic import:
So true! I’ve updated the title. I quickly created this so I wouldn’t forget to do it