I am getting the following error when I am running react native application using react-native-cli
error: node_modulesreact-native-reanimatedsrcindex.ts:
D:DesktopcodingGithubStocksynode_modulesreact-native-reanimatedsrcindex.ts:
Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.
I am attaching the screenshot of error I am getting with my system configuration
2
Answers
Try this: –
npm install react-native-reanimated
In babel.config.js insert plugins: [‘react-native-reanimated/plugin’] (make sure its at the end, it should look like this: –
module.exports = {
presets: [‘module:metro-react-native-babel-preset’],
plugins: [‘react-native-reanimated/plugin’],
};
run react-native start –reset-cache
run your native app (For ios example – npx react-native run-ios)
What you have to do is add this config to your babel.config.js and restart your app.
plugins: [‘react-native-reanimated/plugin’],