Cannot read property 'installCoreFunctions' of undefined

Viewed 3461

I am trying to integrate Reanimated 2.0 in iOS React Native swift project and getting the below error. Android App is working fine but not get the solve for iOS.

https://docs.swmansion.com/react-native-reanimated/docs/

Error: Requiring module "node_modules/react-native-reanimated/src/Animated.js", which threw an exception: TypeError: Cannot read property 'installCoreFunctions' of undefined, js engine: hermes

Package Info :

"react": "17.0.2",

"react-native": "0.67.0",

"react-native-reanimated": "2.3.1"

Hermes is Enabled.

Babel plugin is set for reanimate

Done multiple time node_module clear and cache reset.

2 Answers

you have not done plugin config, in this case it looks like BABEL problem

please read => https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation

make sure you done all there, if u done all from this and still not working then try

npm:

npm start --reset-cache

yarn:

yarn start --reset-cache

if still ... then remove "node_modules" and redownload them by "yarn" or "npm" ( if u r on mac and doing ios development u have to "cd ios && pod install" )

rm -rf node_modules

Did you add Reanimated's babel plugin to your babel.config.js? Like so:

  module.exports = {
      ...
      plugins: [
          ...
          'react-native-reanimated/plugin',
      ],
  };

There can also be a permission error, try running chmod +rwx ./node_modules

Related