question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Metro bundle extremely slow and gets stuck with babel v7.17.x

See original GitHub issue

Description

I had a huge issue bundling the app for development and production as soon as I updated the following packages to the latest version:

"@babel/core": "7.16.12",
"@babel/plugin-proposal-decorators": "7.16.7",
"@babel/runtime": "7.16.7",
"babel-jest": "27.5.1",
"metro-react-native-babel-preset": "0.67.0",

Basically, one of the mentioned packages is causing metro to bundle extremely slow and finally get stuck at approximately 90%. After I reverted the package.json back to an older version, it still didn’t help because of the ^. I had to remove ^ from the packages I mentioned, and it was back to normal.

I’m guessing it’s a babel issue (I also updated React Native to 0.67.3), but I think you guys should know, I spent all day yesterday trying to resolve this (I also looked on here) without any luck.

Also, after all of that I was required to install 2 additional packages:

"@babel/plugin-transform-arrow-functions": "7.16.7",
"@babel/plugin-transform-shorthand-properties": "7.16.7",

Version

0.67.3

Output of npx react-native info

System:
    OS: macOS 12.2.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 606.40 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.14.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.5.2 - /usr/local/bin/npm
    Watchman: 2022.02.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 30, 31
      Build Tools: 30.0.2, 31.0.0, 32.0.0
      System Images: android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: Bumblebee 2021.1.1 Patch 2 Bumblebee 2021.1.1 Patch 2
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.67.3 => 0.67.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Running npx react-native start after updating all the packages to the latest version.

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
renchapcommented, Jun 22, 2022

This seems to only happen for iOS release builds for me, which seems weird.

Metro takes about 40 seconds to build the bundle for Android release builds, but takes about 10 minutes for the iOS release builds. Development build times are normal.

Can this help to narrow the possible cause?

1reaction
efstathiosntonascommented, Feb 28, 2022

Thanks @milos201, it took us 2 days to find out what was going on, hopefully this gets fixed soon as it’s extremely hard to spot the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Newest 'metro-bundler' Questions - Stack Overflow
I'm new to React Native and trying to load a model using @tensorflow/tfjs-react-native and I've narrowed down the problem to the bundleResourceIO function....
Read more >
CZq - River Thames Conditions - Environment Agency - GOV.UK
What is belle's last name, Bridlewood estates chino. ... Review news in slow spanish, Camping etaules 17, United explorer card 65000 miles, Musica...
Read more >
Untitled
Country song about thanksgiving, Misao de samurai x? Forego handicap 2014! Parkour extreme fails 2015, #Ct scan mechanism wikipedia?
Read more >
Untitled
Nocturne in e flat minor sheet music, Potenciometro multivuelta! ... Hd-qsu2 windows 7, My yorkie is constipated what can i do, Centre nouvel...
Read more >
Untitled
My cat is sneezing a lot after surgery, Sia album acting, Adsl cisco card, ... Drug potentiation refers to, Monsta x honestly mr...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found