question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
snowystingercommented, Oct 11, 2022

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)

0reactions
snowystingercommented, Oct 13, 2022

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:

  1. pull down the branch you want
  2. run ./scripts/verdaccio.sh (this will start a local npm proxy registry, and build and publish the branch code to it)
  3. go to a different terminal window and go to your project
  4. delete your node_modules
  5. set your registry temporarily to the proxy server’s url
  6. run install and run whatever you need to in order to verify
  7. done, you can reset your registry and stop the verdaccio server
Read more comments on GitHub >

github_iconTop 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 >
@vtex/admin-ui | Yarn - Package Manager
Fast, reliable, and secure dependency management.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found