skip to Main Content

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.

3

Answers


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

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

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

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