Reputation: 91
I've created a development build of an Expo app using EAS. Previously I would open the app in Expo Go by running npx expo start
and scanning the Metro Bundler QR code.
Now, when I try to do the same thing, Expo Go asks whether I want to open the project in Expo Go or as a "Development Build". It works fine in Expo Go, but crashes immediately when I attempt to open the dev build. The error reads:
null is not an object (evaluating '_ReanimatedModule.default.createNode')
This error is suspiciously similar to one that I encountered earlier in development, which I resolved by downgrading to React Native version 0.69.6. I'm also encountering a second error that says "'main' has not been registered", but I suspect this is downstream of the first error.
I have the same issue when I try to run the app with npx expo start --dev-client
.
Any ideas why I might be having this problem?
Upvotes: 9
Views: 19215
Reputation: 586
I had the same issue, I simply rebuild using EAS with this command
eas build --platform android --profile development
you can follow these steps
Upvotes: 0
Reputation: 41
Not sure if this is relevant anymore, but for me what worked was uninstalling expo-dev-client package.
Upvotes: 4
Reputation: 5734
It sounds like you may have run expo prebuild
(https://docs.expo.dev/workflow/prebuild/) which removes "main": "node_modules/expo/AppEntry.js",
from app.json
. Try to create a new expo app and look at it's app.json
file.
When you run expo prebuild
it changes a few things with your project (see "side effects" in the prebuild docs).
I'm actually working through some issues with that right now too. I thought I had to run prebuild but turns out I didn't have to. Ever since I ran it my app will not load via the dev-client way. I can however switch back to npx expo start
(NOT npx expo start --dev-client
, see the scripts
section of app.json
as that is also changed when prebuild is run).
Let me know if you are able to get your app to load after re-adding the main
stuff to app.json
.
Ps, are you by chance using react-native-google-mobile-ads
?
Upvotes: 6