Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[victory-native] Require cycle: node_modules/victory-vendor/lib-vendor/d3-interpolate/src/value.js -> node_modules/victory-vendor/lib-vendor/d3-interpolate/src/object.js #2230

Closed
jpdriver opened this issue May 11, 2022 · 0 comments · Fixed by #2231
Assignees
Labels
Note: Victory native 📱 Related to Victory Native Type: Docs 📖 This needs to be documented but won't need code changes

Comments

@jpdriver
Copy link
Contributor

This issue is intended to serve as a placeholder for anyone searching for a solution to this issue. We can also use this as a reference for any duplicate issues.

As of victory@36.4.0, React Native apps (on both iOS and Android) will warn about require cycles.


Explanation

These warnings are caused by the way certain d3 packages have been written. You can see circular dependencies in the original d3 source.

For example in object.js

import value from "./value.js";

then in value.js

import object from "./object.js";

However, it is important to note that this is not really an upstream issue. Circular dependencies are allowed in ES modules, which d3 targets. In React Native, they will not break any functionality but Metro will warn about them.

Solution

The maintainers discussed this internally, and ultimately agreed that for now we will provide additional guidance to disable the warnings via LogBox.

@jpdriver jpdriver added Type: Docs 📖 This needs to be documented but won't need code changes Note: Victory native 📱 Related to Victory Native labels May 11, 2022
@jpdriver jpdriver self-assigned this May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Note: Victory native 📱 Related to Victory Native Type: Docs 📖 This needs to be documented but won't need code changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant