Require cycles warnings
See original GitHub issueWith react-native 0.57.8 and latest metro bundler 0.48.5, I get these warnings on the console:
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycle: node_modules/libphonenumber-js/build/common.js -> node_modules/libphonenumber-js/build/IDD.js -> node_modules/libphonenumber-js/build/common.js
12-17 00:30:03.554 4570 4620 W ReactNativeJS:
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycle: node_modules/libphonenumber-js/build/common.js -> node_modules/libphonenumber-js/build/parseIncompletePhoneNumber.js -> node_modules/libphonenumber-js/build/common.js
12-17 00:30:03.554 4570 4620 W ReactNativeJS:
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycle: node_modules/libphonenumber-js/build/getNumberType.js -> node_modules/libphonenumber-js/build/parse.js -> node_modules/libphonenumber-js/build/getNumberType.js
12-17 00:30:03.554 4570 4620 W ReactNativeJS:
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycle: node_modules/libphonenumber-js/build/isPossibleNumber.js -> node_modules/libphonenumber-js/build/getNumberType.js -> node_modules/libphonenumber-js/build/parse.js -> node_modules/libphonenumber-js/build/isPossibleNumber.js
12-17 00:30:03.554 4570 4620 W ReactNativeJS:
12-17 00:30:03.554 4570 4620 W ReactNativeJS: Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-17 00:30:03.555 4570 4620 W ReactNativeJS: Require cycle: node_modules/libphonenumber-js/build/parse.js -> node_modules/libphonenumber-js/build/RFC3966.js -> node_modules/libphonenumber-js/build/parse.js
12-17 00:30:03.555 4570 4620 W ReactNativeJS:
12-17 00:30:03.555 4570 4620 W ReactNativeJS: Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-17 00:30:03.555 4570 4620 W ReactNativeJS: Require cycle: node_modules/libphonenumber-js/build/PhoneNumber.js -> node_modules/libphonenumber-js/build/isPossibleNumber.js -> node_modules/libphonenumber-js/build/getNumberType.js -> node_modules/libphonenumber-js/build/parse.js -> node_modules/libphonenumber-js/build/PhoneNumber.js
12-17 00:30:03.555 4570 4620 W ReactNativeJS:
12-17 00:30:03.555 4570 4620 W ReactNativeJS: Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
Can these warnings be avoided with some refactoring of the imports?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Require cycles are allowed, but can result in uninitialized ...
js This is what triggers the Require cycle warning because a module that was imported from one place, is then rendering and asking...
Read more >Require Cycle Warning on 13.6.0 #1922 - GitHub
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. ... Require cycles are ......
Read more >Require Cycle Warnings : r/reactnative - Reddit
I like using the index.js to export a bunch of components I designed and it keeps giving me Require Cycle Warning /components --Comp1.js…...
Read more >Prevent Require Cycle warnings on terminal-React Native
Prevent Require Cycle warnings on terminal · Require cycles are allowed, but can result in uninitialized values. · Require cycle while requiring store...
Read more >Realm node package has "cycle" warnings - MongoDB
Chrome debugger outputs the following warning that appears to cause circular references and possible memory leaks. Require cycle: ...
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
I currently use the
libphonenumber-js@1.7.50
, and I still got the error :And I don’t use react native.
@catamphetamine How did you stop that in version 7 ?
@thomasleduc Seems to be the latest one. No
common.js
: https://unpkg.com/browse/libphonenumber-js@1.7.50/es6/