0

Please I am facing this error currently in my expo app, is there anyone that can help please, I just upgrade our app to expo / SDK 46.0.0, React native 0.69.6, and I was forced to upgrade to reanimated 2.9.1. thereby bringing this error every time I run npm start —clear, I have imported it in barbel.config.js as mentioned in the documentation. thank you.

complete error

  ERROR  TypeError: _ReanimatedModule.default.configureProps is not a function. (In '_ReanimatedModule.default.configureProps(Object.keys(NATIVE_THREAD_PROPS_WHITELIST), Object.keys(UI_THREAD_PROPS_WHITELIST))', '_ReanimatedModule.default.configureProps' is undefined)
 ERROR  Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.

Please help thanks.

sheriff123
  • 151
  • 1
  • 3
  • 10

4 Answers4

1

Steps to solve this issue:

  1. Check your package.json file and look for 'react-native-reanimated' package. if not available then add the latest version.

  2. Check your babel.config.js and add the following

    module.exports = function (api) { api.cache(true); return { presets: ["babel-preset-expo"], plugins: ["react-native-reanimated/plugin"], }; };

  3. Then we need to clear the cache, run the following command: npx expo start -c

0

I was facing same error after upgrade Expo from 44 to 47. the problem occur coz of react-native-reanimated version. so u need to try set version to @2.10.0 then flow these steps here then problem will be gone

Mohamed Ramadan
  • 120
  • 2
  • 9
0

The main problem is the babel.config.js file. You need to change the content of that file to

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
    plugins: ["react-native-reanimated/plugin"],
  };
};

That solved the same problem for me.

0

If you are using Expo SDK version 49 or later, it requires Reanimated version 3. Expo SDK 49 introduced support for Reanimated 3 and made it the default version. If you are using Reanimated version 2.*, it may not work properly with Expo SDK 49 or later, and you may encounter compatibility issues and errors.

Ahmed5G
  • 310
  • 2
  • 8