【问题标题】:Cannot install @angular/flex-layout in Angular cli 13.0.3无法在 Angular cli 13.0.3 中安装 @angular/flex-layout
【发布时间】:2022-01-02 12:35:27
【问题描述】:

我尝试安装 angular flex 布局,但它一直抛出此错误。有人可以帮我解决这个错误

> (base) rajkirito@rajkirito-Vostro-15-3568:~/Web development/Angular/conFusion$ npm install @angular/flex-layout --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: con-fusion@0.0.0
npm ERR! Found: @angular/cdk@13.0.2
npm ERR! node_modules/@angular/cdk
npm ERR!   @angular/cdk@"^13.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cdk@"^12.0.0" from @angular/flex-layout@12.0.0-beta.35
npm ERR! node_modules/@angular/flex-layout
npm ERR!   @angular/flex-layout@"*" 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 /home/rajkirito/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rajkirito/.npm/_logs/2021-11-24T04_18_03_524Z-debug.log

【问题讨论】:

    标签: angular angular-cli angular-flex-layout


    【解决方案1】:

    此时您需要 --force 选项才能将其与 Angular 13 一起使用。

    详情见here

    【讨论】:

      猜你喜欢
      • 2017-08-22
      • 2017-03-23
      • 2019-10-24
      • 1970-01-01
      • 2019-10-17
      • 1970-01-01
      • 2019-05-10
      相关资源
      最近更新 更多