Google+

Friday, January 14, 2022

SOLVED - Error "Unable to resolve dependency tree" while running npm install

 In this article we review how to fix the Error "Unable to resolve dependency tree" while running npm install  using Angular 12,  error that looks like this :





Solve the Error "Unable to resolve dependency tree" while running npm install  using Angular12


This error is rooted on an npm 7 bug, therefore one solution would be to use npm 6 for now, that means, downgrading to npm 6 , like this:
npm install -g npm@6.14.15

Another solution, without touching NPM, would be to change versions of the Angular dependencies of your app.
Certainly, the present error can happen whether while you are creating a brand new Angular client app, or later on, while running npm install on your app. 
On both cases, you can open the package.json file, and look for the devDependencies section, like this :



Here on this section, change the version of the "jasmine-core" and the "karma-jasmine-html-
reporter" , like this:



Open the terminal and run again the NPM I or npm install command, and everything will get right.
Now you can run ng serve -o, and browse to your app.

That's All!!! 
Enjoy Angular.....

      by Carmel Schvartzman

כתב: כרמל שוורצמן






No comments:

Post a Comment