When I create a brand new react native project, I get this error message:
Cannot find module '@babel/plugin-external-helpers'
My package.json file:
{
"name": "TestProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "0.57.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.4",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
Any idea what is wrong?
Thank you.
Same thing for me, just run
npm install --save-dev @babel/plugin-external-helpers
and it should works
just install @babel/plugin-external-helpers, no need to change .babelrc For me, fixed this issue by installing @babel/plugin-external-helpers and react-transform-hmr.
Run:
npm install --save-dev @babel/plugin-external-helpers
npm install react-transform-hmr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With