Require cycle: gl-react/lib/Bus.js -> gl-react/lib/Node.js -> gl-react/lib/Bus.js
serhiipalash opened this issue · comments
Hi @gre !
There is an issue with latest Metro bundler for React Native - it logs warning of Require cycle
for all node_modules packages
This leads to very slow performance during development in Expo project
Your gl-react
package also have such warning because of
Node.js
-> helpers/invariantNoDependentsLoop.js
-> Node.js
Bus.js
imports Node.js
that imports Bus.js
Can you please restructure the code to remove this cycle?
I would do it by myself but your code is too complex so I can refactor it and don't break anything.
Steps to reproduce:
npm i -g expo-cli
expo init test-require-cycle
cd test-require-cycle
npm install -S gl-react
than in App.js
import gl-react
and start the project
npm run ios
You'll see warnings in Metro logs.
P.S. Here is the same issue fix in react-native-gesture-handler
package
https://github.com/kmagiera/react-native-gesture-handler/pull/323/files
I don't think there is this problem anymore?
I have the same problem, I don't know how to solve it
Require cycle: node_modules\gl-react\lib\Bus.js -> node_modules\gl-react\lib\Node.js -> node_modules\gl-react\lib\Bus.j
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
Require cycle: node_modules\gl-react\lib\Node.js -> node_modules\gl-react\lib\helpers\invariantNoDependentsLoop.js -> node_modules\gl-react\lib\Node.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
appears in the chrome browser when debug mode is active
have this problem
Same problem even though chrome debugger is off
Hi, this issue is still active on version 5.2.0. Is there any fix for this?