在 Angular 中安装 Firebase 时出错

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

我正在尝试使用以下命令安装@angular/fire

ng add @angular/fire@latest

但我收到以下错误。在命令中尝试了不同版本的 firebase,但得到了与上一个相同的错误。我什么都想不通。

The package @angular/fire@latest 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: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^16.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
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.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.
✖ Packages installation failed, see above.

其他信息

Angular CLI: 16.0.2
Node: 18.16.0
Package Manager: npm 9.5.1
OS: linux x64
Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.2
@angular-devkit/build-angular   16.0.2
@angular-devkit/core            16.0.2
@angular-devkit/schematics      16.0.2
@angular/cli                    16.0.2
@angular/fire                   0.0.0
@schematics/angular             16.0.2
rxjs                            7.8.1
typescript                      5.0.4
angular firebase angular-cli
© www.soinside.com 2019 - 2024. All rights reserved.