ng add ng-zorro-antd时失败,不知道什么原因。
版本:
Angular CLI: 13.1.2
Node: 16.13.0
Package Manager: npm 8.1.3
OS: win32 x64
PS C:\angular\demo07> ng add ng-zorro-antd
i Using package manager: npm
‼ Unable to find compatible package. Using 'latest' tag.
‼ Package has unmet peer dependencies. Adding the package may not succeed.
The package ng-zorro-antd@12.1.1 will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: demo07@0.0.0
npm ERR! Found: @angular/animations@13.1.1
npm ERR! node_modules/@angular/animations
npm ERR! @angular/animations@"~13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/animations@"^12.1.0" from ng-zorro-antd@12.1.1
npm ERR! node_modules/ng-zorro-antd
npm ERR! ng-zorro-antd@"12.1.1" 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\Administrator\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-12-25T23_49_36_573Z-debug.log
× Package install failed, see above.
建议在空项目上试试