unable to resolve dependency tree error for creating new angular project unable to resolve dependency tree error for creating new angular project angular angular

unable to resolve dependency tree error for creating new angular project


Open the folder you create with ng new and open the package.json file. In devDependencies change the version of "jasmine-core" 3.6.0 to 3.7.1 and "karma-jasmine-html-reporter" from 1.5.0 to 1.6.0 and save it. Then go back to Terminal and go to your project and run npm install. Now it works and you can run ng serve.


Mine is a temporary solution for angular-cli v11.2.12 based on @david-Öztürk answer and on this angular-cli github issue discussions and on its merged fix.

By executing the steps listed on @david-Öztürk answer I was still getting the same error. And also the fix is more conservative than the proposed solution. I hope it helps someone else:

Run the Angular project creation without automatic npm packages installation:

ng new --skip-install <project-name>

Enter project directory:

cd <project-name>

Edit package.json and change this...

"karma-jasmine-html-reporter": "^1.5.0",

...to this:

"karma-jasmine-html-reporter": "~1.5.0",

Manually install npm packages:

npm install


I had the same problem and I solved it with reinstalling nodeJs 14.16.1but I had to change the version of npm manually with the command

npm install -g npm@6.14.12

After of course, I tested the modifications by creating a project

ng new <MyProjet>