RaphaelJenni / FirebaseUI-Angular

A wrapper for FirebaseUI in Angular
Apache License 2.0
298 stars 69 forks source link

npm install error (dependency conflicts for @angular/common) v6.1.1 #174

Open BenLayet opened 2 years ago

BenLayet commented 2 years ago

Hi, I cloned the project to try and upgrade it to the new firebase v7 api (not compat) but when I run npm install with the current version I get an error.

versions

steps

  1. git clone https://github.com/RaphaelJenni/FirebaseUI-Angular.git
  2. cd FirebaseUI-Angular.
  3. npm install => ERROR
    • @angular/common@"^12.0.0" from @angular/fire@7.1.1
    • @angular/common@"13.0.0" from @angular/forms@13.0.0
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @angular/fire@7.1.1
npm ERR! Found: @angular/common@13.0.0
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"13.0.0" from the root project
npm ERR!   peer @angular/common@"13.0.0" from @angular/forms@13.0.0
npm ERR!   node_modules/@angular/forms
npm ERR!     @angular/forms@"13.0.0" from the root project
npm ERR!   3 more (@angular/platform-browser, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^12.0.0" from @angular/fire@7.1.1
npm ERR! node_modules/@angular/fire
npm ERR!   @angular/fire@"^7.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/common@12.2.16
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@"^12.0.0" from @angular/fire@7.1.1
npm ERR!   node_modules/@angular/fire
npm ERR!     @angular/fire@"^7.1.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.
npm ERR!
RaphaelJenni commented 2 years ago

Hi @blue-seagull , thanks for supporting the project. Sorry for the late response. I'll look into it and see what the problem might be.

RaphaelJenni commented 2 years ago

I was able to reproduce your issue. However, this only happened with an npm version >= 8.6. On version 8.5.5 it works.

Haven't figured out yet what exactly changed.

RaphaelJenni commented 2 years ago

The issue lies in https://github.com/npm/cli/issues/4664 I currently have no time for further investigations, but if you find the root cause for this and know how to fix it, I'm happy to help.