react-aria/i18n circular dependency
See original GitHub issueš Bug Report
We use react-aria extensively in our project, and when we upgraded to react-aria 3.19.0, a new warning appeared regarding the circular dependency between react-aria/i18n/dist/module.js and react-aria/i18n/dist/useMessageFormatter.module.js.
Upgrading to 3.20.0 didnāt solve the issue.
We couldnāt find any mention of this issue here, and also couldnāt find the culprit on our end, so we decided to raise it.
If you think itās a problem on our end, weād be happy to receive any pointers on what to look into.
š¤ Expected Behavior
No circular dependencies present.
šÆ Current Behavior
A warning is shown about the circular dependency in react-aria/i18n when weāre building our package:
[...]
$ yarn build
yarn run v1.22.19
$ rollup -c
src/index.ts ā dist/index.cjs.js, dist/index.esm.js...
(!) Circular dependency
node_modules/@react-aria/i18n/dist/module.js -> node_modules/@react-aria/i18n/dist/useMessageFormatter.module.js -> node_modules/@react-aria/i18n/dist/module.js
[...]
š Your Environment
| Software | Version(s) |
|---|---|
| react-aria | 3.19.0 - 3.20.0 |
| react | 17.0.2 |
| typescript | 4.7.4 |
| nodejs | 18.9.0 |
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
circular dependency detected in reactjs - Stack Overflow
I am facing circular dependency issue in my modal where there is signup form and a login button in the signup form for...
Read more >How to Deal with Circular Dependencies in React Hooks
This is useful for resolving circular references in. // dependency arrays. export default function useNoRenderRef(currentValue) {.
Read more >How to fix nasty circular dependency issues once and for all in ...
In the many projects I have maintained so far, sooner or later I always run into the same issue: circular module dependencies.
Read more >How to Eliminate Circular Dependencies from Your JavaScript ...
Circular dependencies (also known as cyclic dependencies) occur when two or more modules reference each other. ... // file a.ts import { b...
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 Free
Top 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

Hey, thanks for the issue. We havenāt seen this one yet. Iām looking through those packages on our end, but Iām not seeing anything indicating we have a circular dependency. Would you be willing to look in node_modules and see what the actual circle is? (what from each file is depending on the other)
Created a PR with the change, Iām seeing a different structure now in our produced dist. I donāt know if youād be willing to build us locally and check if gets rid of the warning.
An easy way to test us built locally is to:
./scripts/verdaccio.sh(this will start a local npm proxy registry, and build and publish the branch code to it)