skip to Main Content

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

Answers


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

    Login or Signup to reply.
  2. 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 🙂

    Login or Signup to reply.
  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
    
    Login or Signup to reply.
  4. Add this in package.json

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

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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search