nextauthjs / nextauthjs/next-auth

Dependency Conflict: Incompatible firebase-admin version for @auth/firebase-adapter

Open
#11,675 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

adapters bug triage
Dominant language
TypeScript
Stars
28.4k
Forks
4k
PR merge metrics
No merged PRs in 30d

Description

Adapter type

@auth/firebase-adapter

Environment

@radix-ui/react-aspect-ratio": "^1.1.0",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-slot": "^1.1.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"firebase": "^10.13.0",
"lucide-react": "^0.435.0",
"next": "14.2.6",
"next-auth": "^4.24.7",
"next-themes": "^0.3.0",
"react": "^18",
"react-dom": "^18",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7"

Reproduction URL

https://github.com/dheeraj20-bot/translator-saas

Describe the issue

I'm encountering a dependency conflict when trying to install the @auth/firebase-adapter package alongside firebase-admin@12.4.0. The @auth/firebase-adapter package requires firebase-admin@^11.4.1, which is incompatible with the installed version (12.4.0). This results in an ERESOLVE error, making it impossible to resolve the dependency tree.

Operating System :- Windows 11
node Version :- 20.12.2

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @0.1.0
npm ERR! Found: firebase-admin@12.4.0
npm ERR! node_modules/firebase-admin
npm ERR! firebase-admin@"^12.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase-admin@"^11.4.1" from @auth/firebase-adapter@2.4.2
npm ERR! node_modules/@auth/firebase-adapter
npm ERR! @auth/firebase-adapter@"*" 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.

How to reproduce

npm install @auth/firebase-adapter

Expected Behavior:
The @auth/firebase-adapter package should be compatible with the latest version of firebase-admin (v12.x.x) or provide guidance on how to resolve the conflict.

Actual Behavior:
The installation fails with the following error:

Expected behavior

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @0.1.0
npm ERR! Found: firebase-admin@12.4.0
npm ERR! node_modules/firebase-admin
npm ERR! firebase-admin@"^12.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase-admin@"^11.4.1" from @auth/firebase-adapter@2.4.2
npm ERR! node_modules/@auth/firebase-adapter
npm ERR! @auth/firebase-adapter@"*" 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conflict with npm install @auth/firebase-adapter alongside firebase-admin@12.4.0 in the linked reproduction. Inspect the @auth/firebase-adapter package metadata and its firebase-admin peer dependency, then verify installation with the supported versions. Done means the dependency tree resolves for the intended Firebase Admin version or the package documents a confirmed workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, nodejs
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.