1

I am unable to install firebase after i updated Angular v15 to Angular v16.

Expected behavior:

npm install firebase @angular/fire

This work with the previous version of Angular which is Angular 15.

Actual behavior: (Angular 16)

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: morish-wilson@0.0.0

npm ERR! Found: @angular/common@16.0.2

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/fire@7.5.0

npm ERR! node_modules/@angular/fire

npm ERR!   @angular/fire@"*" 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.

1 Answers1

4

It's a known issue (also), you can solve this by using overrides.

"overrides": { 
    "@angular/fire": {
        "@angular/common": "^16.0.1",
        "@angular/core": "^16.0.1",
        "@angular/platform-browser": "^16.0.1",
        "@angular/platform-browser-dynamic": "^16.0.1"
    }
},
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134