Closed CHC383 closed 3 weeks ago
Yeah NPM's peer dependency messages can be confusing - first thing I'd try is changing the order around and also uninstall things completely; I'd start with uninstalling eslint-plugin-jest
completely then re-adding it, then removing all three dependencies and re-adding them together, and a few variations of that.
I've found one of the core problems is the order of things - if you've already got something as a dependency, npm seems to focus on trying to make things work with the existing constraints even if they're optional, whereas when a dependency is being added fresh it seems to take a slightly different approach
Thanks @G-Rath , turns out that it is due some weird status among eslint-plugin-jest
, eslint-config-next
and typescript-eslint
, the node_modules/@typescript-eslint/parser
in package-lock.json
was 6.21.0
, after removing and re-adding them, it is now 7.13.0
and everything works fine.
Removing eslint-plugin-jest
first did help as NPM gave me a different conflicting message that led me to eslint-config-next
. And the whole issue might be caused by some force installation (--force
) before, and likely to be the dependency resolution differences you mentioned above.
Hi, when I tried to upgrade eslint-plugin-jest from 28.5.0 to 28.6.0, I got the following NPM conflict error which I couldn't understand. It complains about
@typescript-eslint/parser
, buteslint-plugin-jest
doesn't depends on it, instead it has@typescript-eslint/eslint-plugin@"^6.0.0 || ^7.0.0
as peerOptional which aligns with@typescript-eslint/eslint-plugin@7.13.0
in the project (coming from typescript-eslint@7.13.0).I guess the error message might be misleading and there are some other dependency problems. Any pointers would be appreciated.