我试图在我的角度项目中添加Transloco,我得到了下面的错误,我的角度项目是12.1.5,您知道我如何修复它吗?
我试着先安装Transloco它会产生相同的错误,然后我尝试了ng add @ngneat/transloco它会产生同样的错误
code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: angular-crumbs@3.0.1
npm ERR! Found: @angular/common@12.1.5
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"^12.0.0 || ^13.0.0-0" from @angular/cdk@12.2.9
npm ERR! node_modules/@angular/cdk
npm ERR! peer @angular/cdk@"12.2.9" from @angular/material@12.2.9
npm ERR! node_modules/@angular/material
npm ERR! peer @angular/material@">=10.2.7" from mat-table-exporter@10.2.4
npm ERR! node_modules/mat-table-exporter
npm ERR! mat-table-exporter@"^10.2.3" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer @angular/cdk@">=10.2.7" from cdk-table-exporter@10.2.4
npm ERR! node_modules/cdk-table-exporter
npm ERR! cdk-table-exporter@"^10.2.4" from mat-table-exporter@10.2.4
npm ERR! node_modules/mat-table-exporter
npm ERR! mat-table-exporter@"^10.2.3" from the root project
npm ERR! 2 more (mat-table-exporter, the root project)
npm ERR! peer @angular/common@"12.1.5" from @angular/forms@12.1.5
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@"^12.0.0 || ^13.0.0-0" from @angular/material@12.2.9
npm ERR! node_modules/@angular/material
npm ERR! peer @angular/material@">=10.2.7" from mat-table-exporter@10.2.4
npm ERR! node_modules/mat-table-exporter
npm ERR! mat-table-exporter@"^10.2.3" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer @angular/forms@"^10.0.0 || ^11.0.0 || ^12.0.0" from ngx-quill@14.3.0
npm ERR! node_modules/ngx-quill
npm ERR! ngx-quill@"^14.3.0" from the root project
npm ERR! 1 more (the root project)
npm ERR! 10 more (@angular/material, @angular/platform-browser, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@">=2.0.0 <7.0.0" from angular-crumbs@3.0.1
npm ERR! node_modules/angular-crumbs
npm ERR! angular-crumbs@"^3.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/common@6.1.10
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@">=2.0.0 <7.0.0" from angular-crumbs@3.0.1
npm ERR! node_modules/angular-crumbs
npm ERR! angular-crumbs@"^3.0.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.发布于 2022-06-08 19:08:49
首先运行以下逗号来安装依赖项:npm
然后运行ng add @ngneat/transloco
阅读这里的deteals:https://www.npmjs.com/package/@ngneat/transloco
https://stackoverflow.com/questions/72550647
复制相似问题