Nozbe / WatermelonDB

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
https://watermelondb.dev
MIT License
10.49k stars 589 forks source link

Followed Supabase Blog For Watermelon Setup, But throwing Bridge is Null errors #1700

Closed RaghavBhat02 closed 5 months ago

RaghavBhat02 commented 11 months ago

So I followed this blog post: https://supabase.com/blog/react-native-offline-first-watermelon-db, but I have not been able to get it working. After copying over the settings from the "Setting up WatermelonDB native dependencies" portion, I followed the setup portion of the Watermolon docs, and created schemas and models, following the watermelon docs. I didn't go past "Setting up WatermelonDB native dependencies"

But my app, now simply errors out, not sure why the bridge would be null: image

SashaGoncharov19 commented 11 months ago

Bump. Same error.

thiagobrez commented 10 months ago

@RaghavBhat02 @SashaGoncharov19 Follow the Watermelon docs installation instead of the article

Instead of adding the expo plugins as the article suggests, you can generate the native directories with npx expo prebuild, and then add the dependencies to the Podfile in 2. Link WatermelonDB's native library (using CocoaPods)

RaghavBhat02 commented 10 months ago

will that mean I have to make my project no longer an expo managed project? so that I can access the podfile?

ozanmakes commented 10 months ago

@RaghavBhat02 I think you need to use custom dev client after following this tutorial, with a command such as eas build --profile development --platform ios (assuming you have set up your eas.json). This way the necessary native modules will be included in your custom expo client build.

Documentation: https://docs.expo.dev/develop/development-builds/introduction/ https://docs.expo.dev/develop/development-builds/create-a-build/

This is the full source code for the app in the article you linked. This will give you more pointers:https://github.com/bndkt/sharemystack/