'babel configuration with 2 plugins inside react native

Hi I am trying to configure my babel.config like this

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['react-native-reanimated/plugin','module:react-native-dotenv', {
    'moduleName': '@env',
    'path': '.env',
    'blacklist': null,
    'whitelist': null,
    'safe': false,
    'allowUndefined': true
  }],
};

but I am having trouble when running the app . Here's a screenshot of the error

enter image description here

I need to configure the dotenv to my babel but at the same time I needed the react-native-reanimated/plugin.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source