React Native SDK with Expo - "Missing Realm constructor" error

According to the latest documentation for MongoDB Realm React Native, it states that their SDK is compatible with Expo…

Expo now supports Realm with the Expo SDK version 44. To use Realm with Expo, upgrade to Expo SDK version 44. Realm does not work with earlier versions of Expo.

We have installed Expo and have the latest version of their SDK, however no matter what we try we get an error stating “Missing Ream Constructor”:

We require the project to be in the Expo managed workflow and not the bare workflow. When we setup in bare workflow, it works.

Are we missing something??

3 Likes

Same Problem here… it works fine as bare project but im unable to make it work as a managed project ( using the Ignite-cli and “expo upgrade”… missing realm constructor … ( 3days im on it)

I have answered a few issues on github that can probably help you both:

The key for Realm to work with Expo is using the expo-dev-client. The dev-client is a custom Expo Go app that you create to run your React-Native JavaScript in an environment that contains any third party library.