react-native bundle never quits, metro-config implicated
See original GitHub issueI have a react-native monorepo which no longer builds bundles. I can run in development just fine, but when I try to build a bundle like so:
react-native bundle --platform ios --entry-file index.js --dev false --bundle-output ./ios/main.jsbundle --assets-dest ./ios --sourcemap-output ./sourcemap.js
It just hangs after this:
Welcome to Metro!
Fast - Scalable - Integrated
info Writing bundle output to:, ./ios/main.jsbundle
info Writing sourcemap output to:, ./sourcemap.js
info Done writing bundle output
info Done writing sourcemap output
info Copying 118 asset files
info Done copying assets
When I use why-is-node-running, I see these handles:
# TTYWRAP
/app/node_modules/metro/node_modules/debug/src/node.js:68 - 2 === fd ? process.stderr :
# SIGNALWRAP
/app/node_modules/metro/node_modules/debug/src/node.js:68 - 2 === fd ? process.stderr :
# TTYWRAP
/app/node_modules/metro-config/src/defaults/index.js:187 - reporter: new TerminalReporter(new Terminal(process.stdout))
/app/node_modules/metro-config/src/defaults/index.js:198 - return getDefaultValues(rootPath);
/app/node_modules/metro-config/src/defaults/index.js:14 - var info = gen[key](arg);
/app/node_modules/metro-config/src/defaults/index.js:36 - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
I don’t know that I trust the line numbers exactly, but it is super weird. metro-config 0.64.0, metro 0.64.0, RN 0.64.0-rc.3. Fails both with and without hermes. Monorepos are notorious for issues with RN, so I do suspect that, but it was working on RN 0.63 and related metro setup.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
ReactNative Metro Bundler not starting automatically
I tried following steps it resolves my issue. Running packager on different port react-native start --port 8084 --reset-cache ...
Read more >@expo/metro-config | Yarn - Package Manager
A Metro config for running React Native projects with the Metro bundler. Exotic. When enabled, exotic mode adds the following assumptions:.
Read more >Troubleshooting - React Native
The Metro bundler runs on port 8081. If another process is already using that port, you can either terminate that process, or change...
Read more >Am I the only one who struggle this much ? : r/reactnative
Finally, have you done a `react-native` init lately? There have been lots of core changes (like the addition of the metro.config.js file) ...
Read more >Configuring Metro - Meta Open Source
A Metro config can be created in these three ways (ordered by ... When Metro is started via the React Native CLI, some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After wasting 2 weeks on this, I solved by simply deleting
yarn.lock
file and then fresh install withyarn install
.(┛ಠ_ಠ)┛彡┻━┻
Might be related to this: https://github.com/aeirola/react-native-svg-asset-plugin/issues/73