Skip to content Skip to sidebar Skip to footer

Invariant Violation: Native Module Cannot Be Null. Error Only Showing Up On Ios

Background I've been developing a React Native app managed by Expo for almost a year now, but was unable to test it on iOS given I didn't have neither a Mac nor an iPhone at my dis

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"