1

I'm trying to install ng zorro for an Angular project. I followed the documentation, on the console I typed:

ng add ng-zorro-antd

but I get this error:

Package installation failed: npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: clima@0.0.0
npm ERR! Found: jasmine-core@3.6.0
npm ERR! node_modules/jasmine-core
npm ERR!   dev jasmine-core@"~3.6.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core@">=3.7.1" from karma-jasmine-html-reporter@1.6.0
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR!   dev karma-jasmine-html-reporter@"^1.5.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! 
npm ERR! See C:\Users\------\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:

I know that is a dependency error, but I'm not sure why it happens.

Thanks.

Edit: here is my Angular version

 ng v 

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 11.2.6
Node: 15.13.0
OS: win32 x64

Angular: <error>
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.6 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            11.2.6 (cli-only)
@angular-devkit/schematics      11.2.6 (cli-only)
@angular/cli                    11.2.6 (cli-only)
@schematics/angular             11.2.6 (cli-only)
@schematics/update              0.1102.6 (cli-only)
rxjs                            6.6.3 (cli-only)
typescript                      4.2.4 (cli-only)
insano
  • 21
  • 5
  • 1
    So actually the problem was in the package.json, where the jasmine version was 3.6.0... I found the answer here https://stackoverflow.com/a/67446215/2300444 – insano May 13 '21 at 00:47
  • Does this answer your question? [unable to resolve dependency tree error for creating new angular project](https://stackoverflow.com/questions/67433893/unable-to-resolve-dependency-tree-error-for-creating-new-angular-project) – R. Richards May 16 '21 at 20:57

0 Answers0