To fix this error, initially check your package.json file to find “react-native-reanimated”. if it is not installed, install it something like to “react-native-reanimated”: “^3.X.X”.
Now update your babel.config.js as follows
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
'react-native-reanimated/plugin',
],
}
Now search for metro.config.js and update config as follows
const config = {
resetCache: true
};
Now run the following command
npm start -- --reset-cache
Now it will work without that error.
