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
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 stepshere then problem will be gone
Steps to solve this issue:
Check your package.json file and look for ‘react-native-reanimated’ package. if not available then add the latest version.
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"],
};
};
Then we need to clear the cache, run the following command: npx expo start -c
The main problem is the babel.config.js file.
You need to change the content of that file to
That solved the same problem for me.