Invariant Violation: Native Module Cannot Be Null. Error Only Showing Up On Ios
Solution 1:
It seems that you added a library which has a native iOS-part and is not part of Expo. You should check your package.json and for each library check on Github if there is an iOS-Folder. If this library is not mentionioning anything about Expo and Expo does not show it either on their website for being compatible with managed project, it is probably the reason and you need to find the alternative for that or eject.
Solution 2:
I often saw this error in the past. This problem occurs when ios native module is not installed properly. You should install native module for ios.
Follow the next step in your react-native project
cd ios
rm -rf Pods Podfile.lock
pod install
yarn ios
Thank you!
Solution 3:
If your using older EXPO version then update it to latest version. First uninstall it and run npm install -g expo-cli
.
Then clear your node modules folder and run npm install
to install node modules again.
Post a Comment for "Invariant Violation: Native Module Cannot Be Null. Error Only Showing Up On Ios"