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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not reporting cycles within index files #382

Open
eppisapiafsl opened this issue Jun 30, 2023 · 4 comments
Open

Not reporting cycles within index files #382

eppisapiafsl opened this issue Jun 30, 2023 · 4 comments

Comments

@eppisapiafsl
Copy link

eppisapiafsl commented Jun 30, 2023

馃憢 Madge( @5 and @6) is not reporting a cycle

I do run madge --circular src/**/*

.madgerc

{
  "baseDir": "./src",
  "fileExtensions": [
    "ts",
    "tsx",
    "js",
    "jsx"
  ],
}

Meanwhile, when running the project I got the follow warning. I have confirmed the files imports each other

Require cycle: src/commons/Locales/index.ts -> src/commons/Locales/LanguageDetector.ts -> src/commons/Locales/index.ts
@soryy708
Copy link

soryy708 commented Dec 6, 2023

Can you please provide a MCVE?

@mrshahzeb7
Copy link

mrshahzeb7 commented Dec 12, 2023

I am also facing this
I have used index file to export
when I run this command
npx madge --circular --extensions ts,tsx,js,jsx .

it is not showing any error(I solved all of them) but in terminal I am still getting 27 warnings of Require cycle:

@joernroeder
Copy link

joernroeder commented Jan 24, 2024

also facing this if I do imports through an index file which does re-exports. I also don't see the dependency as part of the visualization.
Here is a codesandbox which has a circular dep between Foo<>Bar

https://codesandbox.io/p/devbox/elated-moon-g6tl6q?file=%2Fpackage.json%3A11%2C16

you can run yarn verify.

Screenshot 2024-01-24 at 12 55 41

@joernroeder
Copy link

joernroeder commented Jan 24, 2024

played some more, seems like v5.0.2 still recognizes them as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants