Vue 2 build error - ERESOLVE unable to resolve dependency tree

Viewed 491

I'm getting the following dependency issues centering around eslint when I try to build my Vue 2 app.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vue-crm@2.2.3
npm ERR! Found: eslint@8.16.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@">=7.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/parser@2.34.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   dev @typescript-eslint/parser@"^2.26.0" from the root project
npm ERR!   peer @typescript-eslint/parser@"^2.0.0" from @typescript-eslint/eslint-plugin@2.34.0
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     dev @typescript-eslint/eslint-plugin@"^2.26.0" 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!

I have tried changing the eslint version in the package.json to several different versions but nothing resolves the issue.

I have also tried running npm install --save --legacy-peer-deps as suggested for this similar SO question and, though the build begins, it hangs shortly after at about half way through like so:

########⠂⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠋ idealTree: timing idealTree Completed in 29424ms

I am particularly confused by the line npm ERR! Found: eslint@8.16.0. I don't know where this is being found and the version number that it complains about might change each time I try another one in the package.json.

I've been trying to fix this for a couple of days now without any luck. If anyone can tell me what is needed to resolve it I would be very grateful.

0 Answers
Related