react-native app error Unknown option: .name (?)

1.5k views Asked by At

I recently installed files that caused a previous error these two files were not found so I installed them

"metro-react-native-babel-preset": "^0.64.0", "react-native-dotenv": "^2.4.3",

Now I get this error: Any feedback to repair and be able to view my app is appreciated :)

error: App.js: [BABEL] C:\xampp\vibenote-texting\App.js: Unknown option: .name. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

1

There are 1 answers

0
Kemal Ahmed On

react-native-dotenv maintainer here:

This is a common problem that indicates you need to move react-native-dotenv from the presets to the plugins section in the babel.config.js file.