angular - 在 Angular 上安装 ng zorro 的问题
问题描述
我正在尝试为 Angular 项目安装 ng zorro。我按照文档,在我输入的控制台上:
ng add ng-zorro-antd
但我收到此错误:
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:
我知道这是一个依赖错误,但我不确定它为什么会发生。
谢谢。
编辑:这是我的 Angular 版本
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)
解决方案
推荐阅读
- c++ - 存储具有可变数量参数的 boost::function 对象
- python - 如何在数据框中随机分配值
- alexa - 在 ElicitSlot 模式下,Alexa 如何识别停止/取消意图
- c# - 在 Visual Studio C# 中将数据添加到现有 Excel 工作表
- python - Django - Python - URL 与这些都不匹配
- python - 替换方法不从熊猫数据框列中删除字符串
- node.js - 在 NodeJS 中对 Microsoft Graph 的范围应用程序请求
- mysql - 为什么数据库限制行/值大小?
- eclipse - 如何在 Eclipse 插件中使用 tinylog
- amazon-web-services - 将一组特定文件从 Amazon S3 同步到 Dropbox 或 Amazon Drive