Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module `@babel/runtime/helpers/interopRequireDefault` does not exist in the Haste module map

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

npm insatll

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!

like image 886
Vijendra patidar Avatar asked Oct 29 '25 19:10

Vijendra patidar


1 Answers

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

like image 113
M_S_N Avatar answered Nov 01 '25 08:11

M_S_N