I am getting below error while installing the package @typescript-eslint/eslint-plugin
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^9.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.56.0" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! peer @typescript-eslint/parser@"^7.0.0" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! dev @typescript-eslint/eslint-plugin@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/surajsokasane/.npm/eresolve-report.txt for a full report.
Which means the package @typescript-eslint/eslint-plugin which is peer of @typescript-eslint/parser needs eslint^8.56.0.
But the latest version of eslint is the one I have installed - 9.6.0. If I downgrade the eslint to 8.56, the issue will most probably be solved. As I have just installed it, there won't be any headache.
My question is, why latest version on @typescript-eslint/eslint-plugin is not compatible with latest version of eslint?
node_modules
and reinstall all