'Getting TypeError: this.InnerNativeModule.configureProps is not a function in expo on mac

I am running an android app that is created using react native expo. It is running fine on windows machine android studio emulator Recently I switched to mac and this error is popping when I open the project in android studio.

TypeError: this.InnerNativeModule.configureProps is not a function. (In 'this.InnerNativeModule.configureProps(uiProps, nativeProps)', 'this.InnerNativeModule.configureProps' is undefined)
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0

enter image description here

What could be the possible reason for this error and the possible solution? thanks in advance



Solution 1:[1]

I know it's bit long and tedious process to do, but it's actually worked for me.

Note: This is only for those who tried everything possibly can be found on internet and still getting the above errors. (Likewise : changing the react-native-animated version, deleting node_modules, package.json, package_lock.json, clearing cache, upgrading and degrading expo version, tried installing packages using yarn instead npm and so on....)

Step 1 : Uninstall Node and delete everything related with Node, expo, yarn, choco and yarn (Basically delete everything even the path on environment variable). You can follow this : https://stackoverflow.com/a/20711410/9418648

Step 2: Install Node.js (Download the one with most users)

https://nodejs.org/en/download/

Step 3: Once done install Expo

npm install --global expo-cli

Step 4: Clone project from GitHub if you don't have that then create new project and paste the code from you old project and install required dependencies.

Step 5: Run your project by resetting cache.

expo start -c

This process has solved my NPM ERROR code issues, I was unable to install packages using npm command. If that helps you don't forget to vote :)

Solution 2:[2]

The problem is that you have different versions of that library. Make sure you use the same version on the mac too. Just remove the ^ for that library in package.json, then remove package-lock.json and node_modules and reinstall them.

You should have something like this: "react-native-reanimated": "2.3.1",

Solution 3:[3]

Use expo to install the react-native-reanimated package

**expo install react-native-reanimated** 

This will install the compatible version that works well wit expo managed project. If you still want to install with npm install the version ~2.3.1

Installing using NPM

npm install react-native-reanimated@~2.3.1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Pasca Marius
Solution 3 Muneeb Ejaz