Need help to solve this type error. Getting type error in NextAuth adapter

No description
4 Replies
Sturlen
Sturlen5mo ago
make sure your @auth/prisma-adapter or other packages are up to date, since this looks like an issue that exists with earlier versions: https://github.com/nextauthjs/next-auth/issues/6106
GitHub
prisma adapter types error · Issue #6106 · nextauthjs/next-auth
Adapter type @next-auth/prisma-adapter Environment System: OS: Windows 10 10.0.19045 Memory: 991.97 MB / 5.95 GB Binaries: Node: 16.13.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - C:\Progra...
Somnath Golui
Somnath Golui5mo ago
"@auth/prisma-adapter": "^1.0.14",
"next-auth": "^4.24.5",
"@auth/prisma-adapter": "^1.0.14",
"next-auth": "^4.24.5",
It's up-to date I think still getting the error. Looking at the issue you shared.
sangrepura
sangrepura5mo ago
npm uninstall next-auth 😂 lol, that appears to be the exact issue that made me rage quit next-auth. Here's the bug report:
https://github.com/nextauthjs/next-auth/issues/9493. Also related: https://github.com/nextauthjs/next-auth/pull/9503 https://github.com/nextauthjs/next-auth/pull/9381 seriously though, fuck next-auth
GitHub
Issues · nextauthjs/next-auth
Authentication for the Web. Contribute to nextauthjs/next-auth development by creating an account on GitHub.
GitHub
fix(types): createUser should not require id as argument by nbifrye...
☕️ Reasoning The type of Adapter seems to be different for next-auth@4.24.5 and @auth/core@0.19.0. next-auth@4.24.5: createUser?: (user: Omit<AdapterUser, "id">) => Awaitable<...
GitHub
feat: drop user id generation in createUser by balazsorban44 · Pu...
Depends on #9380 upgrade in v4 fix balazsorban44/monorepo-release#10 BREAKING CHANGE: TODO
Somnath Golui
Somnath Golui5mo ago
import type { Adapter } from "next-auth/adapters"; solved the issue for now.