Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13.0.0 can't be used with the latest firebase-functions release (npm error: Conflicting peer dependency) #2772

Open
arnab opened this issue Nov 18, 2024 · 6 comments
Assignees

Comments

@arnab
Copy link

arnab commented Nov 18, 2024

[REQUIRED] Step 2: Describe your environment

  • Operating System version: Mac OSX 15.1
  • Firebase SDK version: 12
  • Firebase Product: Functions & admin
  • Node.js version: 18 (18.16)
  • NPM version: 9.5.1

[REQUIRED] Step 3: Describe the problem

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: firebase-functions@[6](https://github.com/orcalabs-dev/podcast-directory-management-tools/actions/runs/11891283442/job/33131715188?pr=161#step:5:7).1.0
npm error Found: [email protected]
npm error node_modules/firebase-admin
npm error   firebase-admin@"^13.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer firebase-admin@"^11.10.0 || ^12.0.0" from [email protected]
npm error node_modules/firebase-functions
npm error   firebase-functions@"^6.1.0" from the root project
npm error   peer firebase-functions@">=4.9.0" from [email protected]
npm error   node_modules/firebase-functions-test
npm error     dev firebase-functions-test@"^3.3.0" from the root project
npm error
npm error Conflicting peer dependency: firebase-admin@12.[7](https://github.com/orcalabs-dev/podcast-directory-management-tools/actions/runs/11891283442/job/33131715188?pr=161#step:5:8).0
npm error node_modules/firebase-admin
npm error   peer firebase-admin@"^11.10.0 || ^12.0.0" from [email protected]
npm error   node_modules/firebase-functions
npm error     firebase-functions@"^6.1.0" from the root project
npm error     peer firebase-functions@">=4.[9](https://github.com/orcalabs-dev/podcast-directory-management-tools/actions/runs/11891283442/job/33131715188?pr=161#step:5:10).0" from [email protected]
npm error     node_modules/firebase-functions-test
npm error       dev firebase-functions-test@"^3.3.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Steps to reproduce:

  • Add dependency on the latest firebase-admin and firebase-functions
  • Run npm install
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@arnab
Copy link
Author

arnab commented Nov 18, 2024

From what I can tell, this happened with the 12.0.0 release too:

Looks like some sort of workflows need to be instituted by the Firebase team, so that you release both these packages (and related dependencies) together.


Otherwise, upgrades such as dependabot workflows, or someone starting out right now, will run into this problem.

@taeold
Copy link

taeold commented Nov 21, 2024

This was fixed in latest patch release!

https://github.com/firebase/firebase-functions/releases/tag/v6.1.1

Sorry for the delay.

@simeon9696
Copy link

simeon9696 commented Nov 22, 2024

@taeold The latest versions of firebase-functions and firebase-admin don't work together

npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: functions@undefined
npm error Found: [email protected]
npm error node_modules/firebase-admin
npm error   firebase-admin@"^13.0.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer firebase-admin@"^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" from [email protected]
npm error node_modules/firebase-functions-test
npm error   dev firebase-functions-test@"^3.1.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution. 

@arnab
Copy link
Author

arnab commented Nov 26, 2024

Right, this is not fixed yet, @taeold (thanks @simeon9696):

Using the latest releases:

  "dependencies": {
    // ... more deps... 
    "firebase-admin": "^13.0.1",
    "firebase-functions": "^6.1.1",
  },    
  "devDependencies": {
    // ... more deps... 
    "firebase-functions-test": "^3.3.0",
  },    

This is still failing:

➜  functions git:(dependabot/npm_and_yarn/functions/firebase-admin-13.0.1) npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/firebase-admin
npm ERR!   firebase-admin@"^13.0.1" from the root project
npm ERR!   peer firebase-admin@"^11.10.0 || ^12.0.0 || ^13.0.0" from [email protected]
npm ERR!   node_modules/firebase-functions
npm ERR!     firebase-functions@"^6.1.1" from the root project
npm ERR!     peer firebase-functions@">=4.9.0" from [email protected]
npm ERR!     node_modules/firebase-functions-test
npm ERR!       dev firebase-functions-test@"^3.3.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase-admin@"^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" from [email protected]
npm ERR! node_modules/firebase-functions-test
npm ERR!   dev firebase-functions-test@"^3.3.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/firebase-admin
npm ERR!   peer firebase-admin@"^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" from [email protected]
npm ERR!   node_modules/firebase-functions-test
npm ERR!     dev firebase-functions-test@"^3.3.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.

Looks like firebase-functions-test needs to be fixed too.

And perhaps even more importantly, there needs to be a process (or not explicit major version dependency checks in firebase-functions and firebase-functions-test), so that this does not keep happening with every major release (see my comment above: #2772 (comment)).

@Trashpants
Copy link

not exactly a fix but a work around until this gets sorted for me was:

"overrides": {
  "firebase-functions-test": {
	  "firebase-admin": "^13.0.0"
  },
  "tough-cookie": "4.1.3"
},

not sure if tough-cookie is needed for everyone but something to do with @types/request had an issue with it for me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants