Supabase-js (^2.38.4) with Next.js (14.0.4, using app router if it matters) is reporting the following error:
⚠ ./node_modules/node-gyp-build/index.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
Import trace for requested module:
./node_modules/node-gyp-build/index.js
./node_modules/bufferutil/index.js
./node_modules/websocket/lib/WebSocketFrame.js
./node_modules/websocket/lib/websocket.js
./node_modules/websocket/index.js
./node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js
./node_modules/@supabase/realtime-js/dist/module/index.js
./node_modules/@supabase/supabase-js/dist/module/index.js
./node_modules/@supabase/ssr/dist/index.mjs
./src/hooks/useSupabaseBrowserClient.tsx
./src/components/auth/AuthProvider.tsx
Bug report
Describe the bug
Supabase-js (
^2.38.4
) with Next.js (14.0.4
, usingapp
router if it matters) is reporting the following error:To Reproduce
See also https://github.com/supabase/supabase/issues/20153, but it looks like even a clean/fresh install is reporting this error: https://github.com/supabase/supabase/issues/20153#issuecomment-1879704307.
Expected behavior
It looks like an upstream
@supabase-js
or@supabase/ssr
dependency has an import error.Screenshots
N/A
System information
Additional context
Other users seem to be experiencing this as well, even on a clean install (see the quoted comments in
To Reproduce
above).