supabase/supabase-js

After update to @supabase/supabase-js@2.49.10 I get compile warnings

Closed this issue · 4 comments

Bug report

Describe the bug

After updating from @supabase/supabase-js@2.49.9 to @2.49.10, webpack compilation shows critical dependency warnings during Next.js build process. The warnings indicate "the request of a dependency is an expression" and appear to originate from realtime-js module files within the Supabase package when used in Next.js server actions.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Next.js 15.3.3 project with App Router
  2. Install @supabase/supabase-js@2.49.10
  3. Use the Supabase client within a server action (e.g., in a form handler)
  4. Run npm run build for production build

Screenshots

Image

Expected behavior

Clean compilation without dependency warnings, as experienced in version 2.49.9. The build should complete without any webpack warnings related to critical dependencies.

System information

  • OS: Ubuntu LTS (WSL2)
  • Version of supabase-js: 2.49.10
  • Version of Node.js: 22 (LTS)
  • Next.js: 15.3.3
  • React: 19.1

Additional context

  • Downgrading to @supabase/supabase-js@2.49.8 eliminates the warnings completely
  • The application appears to function correctly despite the warnings
  • Warnings specifically mention ./node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js and related files
  • Build completes successfully but the warnings may indicate potential bundling concerns for production deployments

Image

Newest version now gives:

⚠ Compiled with warnings in 20.0s
./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
./app/@modal/action.ts
[webpack.cache.PackFileCacheStrategy] Serializing big strings (100kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)

Hi @ElectricCodeGuy thanks for reporting it, I're working on a fix for the warning.

Thanks.

Related to/duplicate of #1437 btw

Im closing this then