Vijendra patidar
Vijendra patidar

Reputation: 1552

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!

Upvotes: 4

Views: 4969

Answers (1)

M_S_N
M_S_N

Reputation: 2810

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

Upvotes: 7

Related Questions