You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Module @babel/runtime/helpers/interopRequireDefault does not exist in the Haste module map #21310
I've just run into this issue... ever since xcode 10 came out, the number of issues have been out of this world
Reacted by Filipe Prata de Lima, Nicolas Genen, Muhammad Husnain Tahir, David Rowan III, Craig Walker, WillisChou, Ross Miller, Julian Khatibi, Mike Gibson, Joe Bernard and 20 more
for now since a lot of new changes are coming out, this fix worked for me:
with npm:
npm install --save @babel/runtime
or with yarn:
yarn add @babel/runtime
(edited: if you're planning on waiting for the release that fixes this before releasing a new production build (like me) 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 as the original poster said)
if on ios you get _this._registerEvents is not a function, after a successful build
do
npm run start --reset-cache
or
react-native start --reset-cache
edit:
should add @babel/core, under resolutions, in package.json
you may also need "babel-core": "7.0.0-bridge.0" in resolutions
but this is more for react-native projects being upgraded..
Reacted by Eric Lopez, mehmet salih bindak, Vee, Bruno da Silva Valenga, Rod Landaeta, Bruno Serra, FR073N, serge, YUstynov, Julio Bando and 185 more
Reacted by Wendi Attaway Morris, Kosti Marko, IronTony, c0mm4nDer, Rakibul Hasan, Juan Martín Seery, jan-koenig, Victor Malov, Debray Peralta, David Chelidze and 51 more
Reacted by An Nguyễn Phước, Steven Lung and Dominik Mrugalski
Reacted by Vee, Bruno da Silva Valenga, Rod Landaeta, Kosti Marko, IronTony, c0mm4nDer, Rakibul Hasan, Juan Martín Seery, Matthew Cullum, bloey and 67 more
Reacted by Jefri Bulo, SviatVetrov, Pierre Gee, Ali Ben Messaoud, Pedro Martins Melo, Spencer Davies, ChienHsiao, Vishesh, Batın Sözeroğlu, JoyceYy and 6 more
Reacted by jackandero88, Tui Là Cường, Stian Liknes, Mike Gibson, Mario Bermudez Jr, Ani Shroff, Saša Blagojević, Shahrukh Anwar, Lyes, Sascha Turowski and 4 more
for now after react-native init, since a lot of new changes are coming out, this fix worked for me (I got it from reading other issues):
with npm:
npm install --save-dev @babel/core
npm install --save-dev @babel/runtime
or with yarn:
yarn add --dev @babel/core
yarn add --dev @babel/runtime
if on ios you get _this._registerEvents is not a function, after a successful build
do
npm run start --reset-cache
or
react-native start --reset-cache
Thanks @g4laura ! I have been trying to fix this issue for 2 days & your suggestion (especially the inclusion of @babel/runtime) simply works!!
I have tested it for Android, but not for iOS yet.
Reacted by g4laura, 李蘭國, distancelin, Victor Malov, shashank, Tao, Afshin Hoseini, Anthony Ledesma and Bilal SAKAH
Reacted by Wendi Attaway Morris, shashank, Tao and Afshin Hoseini
Thanks for the short fix guys. I'm new to react-native too and it's been 3 days that from a scratch, clean windows install I'm trying to launch a very simple program. Finaly it's working. Thank you again
Fun morning. I had to reset a bunch of dependencies and caches to get things to work. I ended up having to do a combination of things mentioned in this issue and this post.
yarn add @babel/runtime --dev --exact
Ensure that @babel/core and @babel/runtime had matching, exact versions in dev dependencies in package.json.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
@hugoh59 Same for me, I'm really shocked. I tried everything. RN is a piece of shit
Reacted by Artur Bil, Long Nguyen, Michael Qin, mturkin-cr, Yosorable, rh and Himanshu
Reacted by Matt Wisner, Lucas Riondel, Daniel Abitbul, anthowm, Ben Caplan, Brenwell, Celeste Fournier, Dave Mackintosh, Florian Le Frioux, Nikolai Røed Kristiansen and 22 more
Reacted by Girish Parate, James Jara Web, Dima Osipa, pellertson, Loh Yu Chen, Jérémy Barbet, Paul-Lewis Nunn and Maria
I had the same issue. This is what i did to resolve.
Update homebrew (brew update)
Upgrade watchman (brew upgrade watchman)
Made the changes as suggested by (here)[https://github.com//issues/27712#issuecomment-572889578]
I am facing a similar issue, but it is on reactjs. So I have a component library which I have published on github packages using Rollup as my bundler. The component library is also developed in reactjs. So when I install this library on a consumer application(reactjs web app), I'm getting the error as shown in the attached screenshot. Until a month and a half ago everything was working fine. After which I published a new version and ever since that I'm facing the same issue. The version previous to this new version that I published a month and a half ago is working fine but anything published after this version throws up the same error. I even reverted the code back to how it is on the version that is working, but no luck. Requesting help on this issue. Need to resolve this as early as possible.
Activity
sunnylqm commentedon Sep 25, 2018
Should wait for this to be merged #21283
Aximem commentedon Sep 25, 2018
rodrigoelp commentedon Sep 25, 2018
I've just run into this issue... ever since xcode 10 came out, the number of issues have been out of this world
Cnordbo commentedon Sep 25, 2018
Had the same issue on W10 machine.
Its a brand new setup.
Suggested fix works.
jlcool commentedon Sep 25, 2018
silentsiri commentedon Sep 25, 2018
g4laura commentedon Sep 25, 2018
for now since a lot of new changes are coming out, this fix worked for me:
with npm:
npm install --save @babel/runtime
or with yarn:
yarn add @babel/runtime
(edited: if you're planning on waiting for the release that fixes this before releasing a new production build (like me) 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 as the original poster said)
if on ios you get _this._registerEvents is not a function, after a successful build
do
npm run start --reset-cache
or
react-native start --reset-cache
edit:
should add @babel/core, under resolutions, in package.json
you may also need "babel-core": "7.0.0-bridge.0" in resolutions
but this is more for react-native projects being upgraded..
boovius commentedon Sep 25, 2018
wow @g4laura you da man (woman) ! 👍
sungkhum commentedon Sep 25, 2018
You all just fixed the issues I've been having for two days (new to react native). Hopefully these bugs will be fixed, but in the mean time
worked for me. Thanks @Aximem
masashi49 commentedon Sep 26, 2018
私の環境です
私もこのエラーが出ていましたが、
これで動きました!
ありがとう!!
zenz commentedon Sep 26, 2018
just add @babel/runtime to devDependencies is ok.
yarn add @babel/runtime --devsunnylqm commentedon Sep 26, 2018
Fixed in 1323acd but not landed in any version yet, will try to urge them to land in 0.57.2
vyvee commentedon Sep 26, 2018
Thanks @g4laura ! I have been trying to fix this issue for 2 days & your suggestion (especially the inclusion of @babel/runtime) simply works!!
I have tested it for Android, but not for iOS yet.
punter82 commentedon Sep 26, 2018
Thanks @Aximem . Your suggestion worked !!!
ThPch commentedon Sep 26, 2018
Thanks for the short fix guys. I'm new to react-native too and it's been 3 days that from a scratch, clean windows install I'm trying to launch a very simple program. Finaly it's working. Thank you again
69 remaining items
grantgeorge commentedon Feb 14, 2020
Fun morning. I had to reset a bunch of dependencies and caches to get things to work. I ended up having to do a combination of things mentioned in this issue and this post.
Ensure that @babel/core and @babel/runtime had matching, exact versions in dev dependencies in
package.json.Nuke & pave:
robertoporlan commentedon Mar 31, 2020
Thank You so mutch! You save me! haha
stale commentedon Jul 3, 2020
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stale commentedon Jul 11, 2020
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
hugoh59 commentedon Sep 14, 2020
I'm still getting this issue with react-native 0.63.2 and none of these solved it.
OlegPanfyorov commentedon Sep 16, 2020
@hugoh59 Same for me, I'm really shocked. I tried everything. RN is a piece of shit
artadmire commentedon Dec 25, 2020
I'm still getting this issue with react-native 0.63.2 and none of these solved it. Please helper!
lchnnl commentedon Feb 14, 2021
I had the same issue. This is what i did to resolve.
Update homebrew (brew update)
Upgrade watchman (brew upgrade watchman)
Made the changes as suggested by (here)[https://github.com//issues/27712#issuecomment-572889578]
Then ran my npx react-native bundle ....
After successful run
I changed the code back to the original
kovkev commentedon May 26, 2021
I am getting this issue with
I am not sure how to troubleshoot it. I've tried the solutions presented here.
matthew-dean commentedon Oct 14, 2022
Getting this issue with importing directly a TypeScript module package. Wiping and re-installing with
pnpm installhas not worked.kockar96 commentedon Jan 6, 2023
Someone may find this helpful. I had the same problem while using turborepo and Expo.
Resolved it by adding 'node-linker=hoisted' to .npmrc.
chiraag918 commentedon Apr 10, 2023
I am facing a similar issue, but it is on reactjs. So I have a component library which I have published on github packages using Rollup as my bundler. The component library is also developed in reactjs. So when I install this library on a consumer application(reactjs web app), I'm getting the error as shown in the attached screenshot. Until a month and a half ago everything was working fine. After which I published a new version and ever since that I'm facing the same issue. The version previous to this new version that I published a month and a half ago is working fine but anything published after this version throws up the same error. I even reverted the code back to how it is on the version that is working, but no luck. Requesting help on this issue. Need to resolve this as early as possible.
support pnpm build error per this helpful comment when facing @babel-…