madge icon indicating copy to clipboard operation
madge copied to clipboard

Not reporting cycles within index files

Open eppisapiafsl opened this issue 2 years ago • 4 comments

👋 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

eppisapiafsl avatar Jun 30 '23 17:06 eppisapiafsl

Can you please provide a MCVE?

soryy708 avatar Dec 06 '23 15:12 soryy708

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:

mrshahzeb7 avatar Dec 12 '23 10:12 mrshahzeb7

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 avatar Jan 24 '24 11:01 joernroeder

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

joernroeder avatar Jan 24 '24 22:01 joernroeder