angularfirebasenpmangularfireionic7

cant install @angular/fire because of incompatibility issues


so i ran npm outdated and tried to install some outdated things there without knowing what it really does, thinking that i should update them. and this is what i really need. i need to install angular fire and this shows

⠏ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @ionic/angular-server@7.7.4
npm ERR! Found: @angular/animations@17.2.1
npm ERR! node_modules/@angular/animations
npm ERR!   @angular/animations@"^17.0.2" from the root project
npm ERR!   peerOptional @angular/animations@"17.2.1" from @angular/platform-browser@17.2.1  
npm ERR!   node_modules/@angular/platform-browser
npm ERR!     @angular/platform-browser@"^17.0.2" from the root project
npm ERR!     peer @angular/platform-browser@"^17.0.0" from @angular/fire@17.0.1
npm ERR!     node_modules/@angular/fire
npm ERR!       @angular/fire@"^17.0.1" from the root project
npm ERR!     3 more (@angular/forms, @angular/platform-browser-dynamic, @angular/router)    
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/platform-server@">=14.0.0" from @ionic/angular-server@7.7.4
npm ERR! node_modules/@ionic/angular-server
npm ERR!   @ionic/angular-server@"^7.7.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/animations@17.2.4
npm ERR! node_modules/@angular/animations
npm ERR!   peer @angular/animations@"17.2.4" from @angular/platform-server@17.2.4
npm ERR!   node_modules/@angular/platform-server
npm ERR!     peer @angular/platform-server@">=14.0.0" from @ionic/angular-server@7.7.4      
npm ERR!     node_modules/@ionic/angular-server
npm ERR!       @ionic/angular-server@"^7.7.4" 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!

the angular animations is till not on the wanted version of my project cause when i tried updating it, theres also an compatibility issue


Solution

  • just run with force flag.

    npm install @angular/fire --force