close

[Solved] TypeError: undefined is not an object (evaluating ‘InnerNativeModule.installCoreFunctions’)

I am trying to run my react native project But I am facing the following error TypeError: undefined is not an object (evaluating ‘InnerNativeModule.installCoreFunctions’) in React-Native. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How TypeError: undefined is not an object (evaluating ‘InnerNativeModule.installCoreFunctions’) Error Occurs ?

I am trying to run my react native project But I am facing the following error.

TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')

So here I am writing all possible solutions that I have tried to resolve this error.

How To Solve TypeError: undefined is not an object (evaluating ‘InnerNativeModule.installCoreFunctions’) Error ?

  1. How To Solve TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions') Error ?

    To Solve TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions') Error First of all You need to open your build.gradle file that you can find in android/app/build.gradle this path. and simply change enableHermes to true. Then Open Your MainApplication.java file and add this two-line on top of the file: import com.facebook.react.bridge.JSIModulePackage; import com.swmansion.reanimated.ReanimatedJSIModulePackage; Now, Open Your bable.config.js file and add: module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ “react-native-reanimated/plugin”, ], }; Then open your index.js file and add import 'react-native-gesture-handler'. Now, Just clean your app and re-run your app and your error must be solved. Thank you.

  2. TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')

    To Solve TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions') Error First of all You need to open your build.gradle file that you can find in android/app/build.gradle this path. and simply change enableHermes to true. Then Open Your MainApplication.java file and add this two-line on top of the file: import com.facebook.react.bridge.JSIModulePackage; import com.swmansion.reanimated.ReanimatedJSIModulePackage; Now, Open Your bable.config.js file and add: module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ “react-native-reanimated/plugin”, ], }; Then open your index.js file and add import 'react-native-gesture-handler'. Now, Just clean your app and re-run your app and your error must be solved. Thank you.

Solution 1: Follow this step

1. Change enableHermes to true

First of all You need to open your build.gradle file that you can find in android/app/build.gradle this path. and simply change enableHermes to true.

project.ext.react = [
    enableHermes: true, // Make enableHermes to true
]

2. Add this line in MainApplication.java 

Then Open Your MainApplication.java file and add this two-line on top of the file.

import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;

Now, add this function

@Override
protected JSIModulePackage getJSIModulePackage() { 
     return new ReanimatedJSIModulePackage(); 
}

3. Add this line in bable.config.js

Now, Open Your bable.config.js file and add

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    "react-native-reanimated/plugin",
  ],
};

Then open your index.js file and add import ‘react-native-gesture-handler’. Now, Just clean your app and re-run your app and your error must be solved. Thank you.

Summary

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment