cdro
06/16/2022, 12:09 AM@supabase/supabase-js
can no longer be used in Edge Functions. This is because native NodeJS API's are not supported and it appears there are some dependencies of realtime-js that use these. Here is a look at the stack trace. Has anyone else come across this issue?
Module not found: Can't resolve 'fs'
Import trace for requested module:
./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
./pages/api/v0/_middleware.ts
https://nextjs.org/docs/messages/module-not-found
You're using a Node.js module (fs) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
Needle
06/16/2022, 12:09 AMgaryaustin
06/16/2022, 1:14 AMcdro
06/16/2022, 3:44 PM