_index.default is undefined - Expo app from Supabase tutorial throws an error on the web #1238
Closed
2 tasks done
Labels
bug
Something isn't working
Bug report
Describe the bug
After strictly following the Build a User Management App with Expo React Native tutorial in the supabase docs and running the web version of the app I was faced with the following error message:
Uncaught TypeError: _index.default is undefined
in FirefoxUncaught TypeError: Cannot destructure property 'PostgrestClient' of '_index.default' as it is undefined.
in ChromeThis happened only with the web version. When I ran the app in Expo Go on Android it worked perfectly.
I tried to debug the code and narrowed it down to single import statement
import { createClient } from "@supabase/supabase-js";
Only when this import statement is commented out does the error go away.
To Reproduce
npx expo install react-dom react-native-web @expo/metro-runtime
npm start
in the console and open the localhost url in your browser.If you want the app to load without the error, continue with the following:
Expected behavior
Load the web page fully without the
Uncaught TypeError: _index.default is undefined
error message.System information
Additional context
I have only found one other mention of this error from a discord user two days ago here
I have created a stack overflow question here
The text was updated successfully, but these errors were encountered: