profile
viewpoint

Ask questionsbundleReleaseJsAndAssets slow for react-native 0.60 / node v12 combo

Hi there!

I believe I am using the most recent metro, or very near it, as this is with react-native 0.60 rc3 which has a 0.54.1 version of metro in package-lock.json after using react-native cli to do an app init using the RN0.60RC3 template

What is the current behavior?

For some reason, which this combination, it is taking a great deal more time to generate the release bundle then with any other combination of react-native 0.59 vs 0.60 and node 8, 10, 11 or "node" (currently 12.5)

I'm testing them all as part of the jetifier project in CI and this was noticeable.

I have a test script at rn-androidx-demo which use as the test suite for jetifier and the link to the build that shows the problem is here:

https://travis-ci.com/mikehardy/jetifier/jobs/212061157

You can see all an identical job but with node 11 here: https://travis-ci.com/mikehardy/jetifier/jobs/212061152 - it's 5 minutes different

facebook/metro

Answer questions AndrewJack

@mikehardy it's an issue with node 12.5. Downgrade to 12.4 or earlier and the issue goes away.

I agree it's strange it only surfaced with RN 0.60, but it's fine with RN 0.59

https://github.com/facebook/react-native/issues/25650#issuecomment-511822738 https://github.com/react-native-community/cli/issues/485#issuecomment-509210382

useful!

Related questions

i have local javascript library How do i config metro.config.js hot 2
`SHA-1 for file ... is not computed` when using `resolver.resolveRequest` hot 1
metro-config sharedBlacklist regexp without scape "\" hot 1
Follow symlinks? hot 1
`SHA-1 for file ... is not computed` when using `resolver.resolveRequest` hot 1
ReferenceError: SHA-1 for file [(...).png] is not computed hot 1
metro-config sharedBlacklist regexp without scape "\" hot 1
Error: Cannot find module 'metro/src/DeltaBundler/Worker' hot 1
concurrent builds fail due to shared use of /tmp/metro-cache/ hot 1
metro-config sharedBlacklist regexp without scape "\" hot 1
Minification can break code (but cannot be disabled?) hot 1
Error: Cannot find module 'metro/src/DeltaBundler/Worker' hot 1
RN - Error: jest-haste-map: @providesModule naming collision hot 1
Couldn't find preset "module:metro-react-native-babel-preset" when running jest hot 1
metro-config sharedBlacklist regexp without scape "\" hot 1
Github User Rank List