Issue
I am start learn to react native i am getting this when i have run my project build successfully but when open the app and get this error
I have to run my react native sample project like react-native init AwesomeProject
cd AwesomeProject
react-native run-android
and getting this errorerror: bundling failed: Error: Unable to resolve module
@babel/runtime/helpers/interopRequireDefault
from/Users/macbookpro/AwesomeProject/index.js
: Module@babel/runtime/helpers/interopRequireDefault
does not exist in the Haste module map`
before i have complete my all react native setup from this link
https://facebook.github.io/react-native/docs/getting-started.html
I am use macOS High Sierra 10.13.6
I would appreciate any help!
Solution
The issue can be fixed by using
npm add @babel/runtime
npm install
or
yarn add @babel/runtime
The issue is still open at this moment and will hopefully get resolved in new release. For now,you can keep babel/runtime in devDependencies, but if you want to build a release build with this version of react-native, you need to put @babel/runtime in dependencies.
Here is the link for more details
Answered By - M_S_N
Answer Checked By - Clifford M. (JavaFixing Volunteer)