Closed Tsabary closed 1 year ago
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate.
incomplete
label?To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository (template), but you can also use a tool like CodeSandbox or StackBlitz.
To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue.
Please test your reproduction against the latest version of NextAuth.js (next-auth@latest
) to make sure your issue has not already been fixed.
Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.
Issues with the incomplete
label that receives no meaningful activity (e.g. new comments with a reproduction link) are automatically closed and locked after 30 days.
If your issue has not been resolved in that time and it has been closed/locked, please open a new issue with the required reproduction.
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the :+1: reaction on the topmost comment (please do not comment "I have the same issue" without repro steps). Then, we can sort issues by votes to prioritize.
We look into every NextAuth.js issue and constantly monitor open issues for new comments.
However, sometimes we might miss one or two. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.
Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.
I think the problem here is installing @next-auth/mongodb-adapter@next
instead of @next-auth/mongodb-adapter
. The @next
package is very old.
"dist-tags": {
"experimental": "0.0.2-pr.274-8c5c0fd1.289",
"latest": "1.1.1",
"next": "0.0.2-next.298"
},
I think the problem here is installing
@next-auth/mongodb-adapter@next
instead of@next-auth/mongodb-adapter
. The@next
package is very old."dist-tags": { "experimental": "0.0.2-pr.274-8c5c0fd1.289", "latest": "1.1.1", "next": "0.0.2-next.298" },
I think the issue still subsists with @next-auth/mongodb-adapter
.
If you install mongodb via npm i mongodb
, you get the current version (5.0.1) which doesn't work well with mongodb-adapter.
To reproduce, start a sveltekit application, install mongodb then install @next-auth/mongodb-adapter.
👍 What you've written looks like a much clearer description of the problem.
Hey there! Are you planning on supporting Mongo V5 ?
So, just to get this clear, MongoDB's official NextAuth adapter, which can be found on NextAuth's website https://authjs.dev/reference/adapter/mongodb doesn't work with MongoDB 5.3.0 ? Why isn't that specified somewhere ? I'm not exactly sure where to look.
I'm getting the same kind of error as @Tsabary here, and I can't find any relevant info on Google.
Not sure whether to install the adapter using --legacy-peer-deps, or just rollback my MongoDB install to the latest compatible version, and what version would that be anyway ? Version 4 ? Quite confusing honestly.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: website_test@0.1.0
npm ERR! Found: mongodb@5.3.0
npm ERR! node_modules/mongodb
npm ERR! mongodb@"^5.3.0" from the root project
npm ERR! peer mongodb@">=3.4.0" from mongodb-client-encryption@2.7.1
npm ERR! node_modules/mongodb-client-encryption
npm ERR! peerOptional mongodb-client-encryption@">=2.3.0 <3" from mongodb@5.3.0
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer mongodb@"^5 | ^4" from @next-auth/mongodb-adapter@1.1.2
npm ERR! node_modules/@next-auth/mongodb-adapter
npm ERR! @next-auth/mongodb-adapter@"*" from the root project
Seems like this is still an active issue, been over a year 🤔
Same issue
Same issue here. It seems that the problem is NOT important for the Next-Auth team:
"dependencies": { "@next-auth/prisma-adapter": "^1.0.7", "@prisma/client": "^5.1.1", "@react-email/components": "0.0.14", "@stripe/connect-js": "^3.2.0", "@stripe/react-stripe-js": "^2.4.0", "@stripe/stripe-js": "^2.2.2", "@types/node": "20.4.4", "@types/react": "18.2.15", "@types/react-dom": "18.2.7", "autoprefixer": "10.4.14", "axios": "^1.5.0", "bcrypt": "^5.1.1", "date-fns": "^2.30.0", "eslint": "8.45.0", "eslint-config-next": "^14.1.0", "next": "^14.1.0", "next-auth": "^4.24.5", "next-cloudinary": "^4.27.0", "postcss": "8.4.27", "query-string": "^8.1.0", "react": "^18.2.0", "react-date-range": "^1.4.0", "react-dom": "^18.2.0", "react-email": "2.0.0", "react-hook-form": "^7.45.4", "react-hot-toast": "^2.4.1", "react-icons": "^4.10.1", "react-select": "^5.7.5", "resend": "^3.0.0", "stripe": "^14.10.0", "tailwindcss": "3.3.3", "typescript": "^5.3.3", "world-countries": "^5.0.0", "zustand": "^4.4.1" },
Still happening, tried now with version 6.9 of mongodb and still giving errors of dependencies
Adapter type
@next-auth/mongodb-adapter
Environment
When running the command
`npm install mongodb next-auth @next-auth/mongodb-adapter@next
this is what I get.