Open AddictArts opened 7 months ago
If you run npm ls typescript @typescript-eslint/typescript-estree
you should be able to find the dependencies tree related to your problem.
Lately, I run into a similar issues and forces those packages version package.json overrides mechanism:
{
...
"overrides": {
...
"@typescript-eslint/eslint-plugin": "7.7.0",
"@typescript-eslint/utils": "7.7.0",
"@typescript-eslint/parser": "7.7.0",
...
"typescript": "5.4.5",
...
},
...
}
The issue you mentioned disappeared and my project was still operational 😎
@tetedacier thanks, I cannot use overrides, but I tested and it didn't eliminate the warning from madge.
❯ npm ls typescript @typescript-eslint/typescript-estree
something@0.9.0 D:\something
+-- @something/electron@0.9.0 -> .\apps\electron
| `-- electron-builder@24.9.1
| `-- read-config-file@6.3.2
| `-- config-file-ts@0.2.4
| `-- typescript@4.9.5
+-- @typescript-eslint/eslint-plugin@7.7.0
| +-- @typescript-eslint/type-utils@7.7.0
| | `-- @typescript-eslint/typescript-estree@7.7.0 deduped
| +-- @typescript-eslint/utils@7.7.0
| | `-- @typescript-eslint/typescript-estree@7.7.0 deduped
| `-- ts-api-utils@1.3.0
| `-- typescript@5.1.6 deduped
+-- @typescript-eslint/parser@7.7.0
| `-- @typescript-eslint/typescript-estree@7.7.0
`-- typescript@5.1.6
I downgraded to 5.1.6. It is not identifying typescript version correctly.
I ran npm ls typescript @typescript-eslint/typescript-estree
and it looks like the wrong version comes from precinct which is a dependency of madge itself
├─┬ madge@7.0.0
│ ├─┬ dependency-tree@10.0.9
│ │ ├─┬ filing-cabinet@4.2.0
│ │ │ └── typescript@5.0.4 deduped
│ │ └── typescript@5.0.4 deduped
│ ├─┬ precinct@11.0.5
│ │ └─┬ detective-typescript@11.2.0
│ │ ├── @typescript-eslint/typescript-estree@5.62.0
│ │ └── typescript@5.4.5
│ └── typescript@5.0.4 deduped
After overriding in package.json as tetedacier suggested the warning disappeared
"overrides": {
...
"typescript": "5.0.4"
}
├─┬ madge@7.0.0
│ ├─┬ dependency-tree@10.0.9
│ │ ├─┬ filing-cabinet@4.2.0
│ │ │ └── typescript@5.0.4 deduped
│ │ └── typescript@5.0.4 deduped
│ ├─┬ precinct@11.0.5
│ │ └─┬ detective-typescript@11.2.0
│ │ ├── @typescript-eslint/typescript-estree@5.62.0
│ │ └── typescript@5.0.4 deduped
│ └── typescript@5.0.4 deduped
My root package.json
`"typescript": "5.2.2",
No other file has "typescript" in it. My global npm
`"typescript": "5.2.2",
I checked the node_modules/typescript/package.json
I also used qnm
5.2.2 is installed. I ripgrep for 5.4.5 and nothing. I can't determine how madge thinks I have 5.4.5.
I still get