Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: _ReanimatedModule.default.configureProps is not a function

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.

like image 941
sheriff123 Avatar asked Sep 08 '26 13:09

sheriff123


2 Answers

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.

like image 113
Ahmed5G Avatar answered Sep 11 '26 00:09

Ahmed5G


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.

like image 43
Abdurrahman Sayed Avatar answered Sep 11 '26 00:09

Abdurrahman Sayed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!