6

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

4 Answers4

9

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",

Pasca Marius
  • 111
  • 2
6

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
Muneeb Ejaz
  • 696
  • 6
  • 11
  • This should be the accepted answer, if you are using expo, you upgraded expo version, or switched to yarn from npm or anything related to package.json and this error appeared, this is the answer to solve your issue. expo install react-native-reanimated – Faisal Shahzad Aug 20 '22 at 17:13
2

Add this in package.json

"resolutions": { "react-native-reanimated": "^2.9.1" },

https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/

0

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 :)

sophin
  • 583
  • 5
  • 11