close

[Solved] ERESOLVE Unable to resolve dependency tree error when installing npm packages

Hello Guys, How are you all? Hope You all Are Fine. Today I am installing npm packages and suddenly I got the following error Unable to resolve dependency tree error when installing npm packages in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ERESOLVE Unable to resolve dependency tree error when installing npm packages Error Occurs ?

When trying to install the npm packages using npm i the command I am getting the following exception:

ERESOLVE Unable to resolve dependency tree

How To Solve ERESOLVE Unable to resolve dependency tree error when installing npm packages Error ?

  1. How To Solve ERESOLVE Unable to resolve dependency tree error when installing npm packages Error?

    To Solve ERESOLVE Unable to resolve dependency tree error when installing npm packages You have dependency conflict (incorrect and potentially broken dependency) as it says, So try to run the command with --force, or --legacy-peer-deps. If it doesn't take effect, the temporary solution is using prior versions of the node (Downgrading node version) as it causes to happen such this kind of errors sometimes.

  2. Unable to resolve dependency tree error when installing npm packages

    To Solve ERESOLVE Unable to resolve dependency tree error when installing npm packages You have dependency conflict (incorrect and potentially broken dependency) as it says, So try to run the command with --force, or --legacy-peer-deps. If it doesn't take effect, the temporary solution is using prior versions of the node (Downgrading node version) as it causes to happen such this kind of errors sometimes.

Solution 1: Downgrading node version

You have dependency conflict (incorrect and potentially broken dependency) as it says, So try to to run the command with --force, or --legacy-peer-deps. If it doesn’t take effect, the temporary solution is using prior versions of the node (Downgrading node version) as it causes to happen such this kind of errors sometimes.

Solution 2: Use –legacy-peer-deps

Use this command

npm install --save --legacy-peer-deps

Solution 3: npm config set legacy-peer-deps true

In addition to using the --legacy-peer-deps command line option, this can also be set more permanently as a config option:

npm config set legacy-peer-deps true

Solution 4: Try npm cache clean –force

Try removing the node modules and package-lock.json file and run command npm install or Try npm cache clean --force

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment