-
Notifications
You must be signed in to change notification settings - Fork 538
Closed
Labels
bugSomething isn't workingSomething isn't workingrealtime-jsRelated to the realtime-js library.Related to the realtime-js library.
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When using @supabase/supabase-js in an expo react native project, if I use the unstable_enablePackageExports with the metro bundler, bundling fails with the following error:
To Reproduce
- Generate a new expo app
- Add
@supabase/supabase-jsas a dependency - Create a supabase client in the main
_layout.tsxfile - Run
npx expo customize metro.config.js - Add
config.resolver.unstable_enablePackageExports = true;tometro.config.js - Add
ios.bundleIdentifiertoapp.json - Run
npx expo run:ios
Repro repo: https://github.com/aldebout/supabase-expo-exports-issue
Expected behavior
No crash
Screenshots
System information
- OS: macOS
- Version of supabase-js: 2.45.1
- Version of Node.js: 20.16.0
Additional information
Opening here because the error message I got in my actual project was
The package at "../../node_modules/@supabase/realtime-js/node_modules/ws/lib/stream.js" attempted to import the Node standard library module "stream".
It failed because the native React runtime does not include the Node standard library.
rsml, emkis, ccdwyer, NiklasDue, kuyaC and 14 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingrealtime-jsRelated to the realtime-js library.Related to the realtime-js library.