. Advertisement .
..3..
. Advertisement .
..4..
Errors may appear on your computer for many different reasons; it may be a simple or complicated error. If you ignore or try to turn off the window, it sometimes goes wrong when you try to repair the computer. So, consider what you are doing on the PC when the error message appears, record what program is causing the error or what version of the program you are running and what is the program trying to install when the error happens. Determine the cause of the error message and try also to search for a solution to your problem as our simple tips here. In this article, we will show you the error that you can find when you install npm packages. Let’s explore the error ERESOLVE Unable to resolve dependency tree error when installing npm packages.
When does ERESOLVE Unable to resolve dependency tree error when installing npm packages error come from?
While you establish the npm packages using npm i the text, the following special case is turned out:
ERESOLVE Unable to resolve dependency tree
In this case, the advice for you is to add the message –force, other is –legacy-peer-deps. This error is considered as an inappropriate and probably defective dependency. However, it does not work, the temporary recommendation is used prior to the node version. The node version needs to be downgraded, the cause might be this style of issue sometimes.
Effective facilities to resolve ERESOLVE Unable to resolve dependency tree error when installing npm packages error
Solution 1: Add –legacy-peer-deps
Add –legacy-peer-deps is the simplest way for you to solve the error “ERESOLVE Unable to resolve dependency tree error when installing npm packages”.
Refer to this direction if the error of installing the npm packages using npm i
npm install --save --legacy-peer-deps
Solution 2: Consume the word –legacy-peer-deps in the menu
Another guidance is to consume the word –legacy-peer-deps in the menu, as a config preference can be set more permanently:
npm config set legacy-peer-deps true
Solution 3: Run npm cache clean –force
Uninstalling the node modules with package-lock.json, the recommendation to replace is to install the directive “npm install”. However, you might run npm cache clean –force if it does dive.
Solution 4: Downgrade the Node.js version
Downgrading the Node.js version is also a great way for you to solve the error “ERESOLVE Unable to resolve dependency tree error when installing npm packages”. Let’s follow the guide below:
An HTTP proxy has nothing to do with this.
Attempting running the program with —legacy-peer-deps or —force if it complains that you have a dependency conflict (incorrect and perhaps broken dependence). Using earlier versions of Node.js (downgrade the Node.js version) is a temporary fix if it doesn’t work because it can occasionally result in this type of problem.
Based on the OP’s update, an update:
As you can see, it generates the subsequent error:
No matching version found for @angular/[email protected]^9.1.4.
View the angular/http page. Keep in mind that while you request a higher version (such as 9.1.4), the most recent version for that obsolete package is 7.2.16! So, in order to fix the issue, try checking the project dependencies and paying attention to the problems that were raised.
Conclusion
JavaScript, which is the world’s most popular programming language, is the programming language of the Web. It is easy to learn and a lot of people learn to program. Thus there will be errors while running any package. Take a note! That is the best method to remember the way to correct any issue or you can save this title for the future if you face it again. Hopefully, our straightforward tips above support you a lot in the road of learning. I make sure you can remove the problem of “ERESOLVE Unable to resolve dependency tree error when installing npm packages” as suggested. We would appreciate it if you have any questions for us in the comments box. Have a wonderful day ahead!
Read more
→ Tips On Solving The Error: “When I run ng new npm ERR! ERESOLVE unable to resolve dependency tree”
Leave a comment