降级@angular/google-maps版本

问题描述 投票:0回答:1

我需要降级我的项目的 @angular/google-maps 版本,该版本是 15.0.2 版本,但我正在使用的 Angular 版本是 14.2.6,所以当我尝试安装另一个库时,它会创建冲突。我需要降级 @angular/google-maps 版本。

我尝试卸载@angular/google-maps,以便我可以安装旧版本,它与 tslib 发生冲突。如果有人可以帮助我或给我建议,我将非常感激,谢谢

PS C:\Project> npm uninstall @angular/[email protected]
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @angular/[email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@"^14.0.0 || ^15.0.0" from @angular/[email protected]
npm ERR!   node_modules/@angular/cdk
npm ERR!     peer @angular/cdk@"14.2.7" from @angular/[email protected]
npm ERR!     node_modules/@angular/material
npm ERR!       peer @angular/material@"14.2.7" from @angular/[email protected]
npm ERR!       node_modules/@angular/material-moment-adapter
npm ERR!         @angular/material-moment-adapter@"^14.2.5" from the root project
npm ERR!       1 more (the root project)
npm ERR!     @angular/cdk@"^14.2.5" from the root project
npm ERR!   peer @angular/common@"^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0" from @angular/[email protected]
npm ERR!   node_modules/@angular/fire
npm ERR!     @angular/fire@"^7.4.0" from the root project
npm ERR!   6 more (@angular/forms, @angular/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^15.0.0 || ^16.0.0" from @angular/[email protected]
npm ERR! node_modules/@angular/google-maps
npm ERR!   @angular/google-maps@"^15.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@"^15.0.0 || ^16.0.0" from @angular/[email protected]
npm ERR!   node_modules/@angular/google-maps
npm ERR!     @angular/google-maps@"^15.0.2" 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!
npm ERR! For a full report see:
npm ERR! C:\Users\Marti\AppData\Local\npm-cache\_logs\2024-04-22T19_10_48_543Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:\Users\Marti\AppData\Local\npm-cache\_logs\2024-04-22T19_10_48_543Z-debug-0.log
angular google-maps dependencies
1个回答
0
投票

只需在软件包名称后使用 --force 选项即可卸载所需版本

© www.soinside.com 2019 - 2024. All rights reserved.