nextAuth causes error - Module not found Can't resolve 'nextheaders'

I'm suddenly having an error on all my pages that says: ./node_modules/next-auth/next/index.js:97:6 Module not found: Can't resolve 'next/headers' Stack: "next": "^12.2.0", "next-auth": "^4.15.1", (Also tried with latest version, does not work) It might be worth noting that I use: import { unstable_getServerSession } from 'next-auth'; But It didn't do any problem until now
2 Replies
Stivo
Stivo3y ago
try "next-auth": "4.15.1" without the "^"
Aviv
AvivOP3y ago
Thank but didn't work, I've tried many version combination, but one time its an headers error, one time "v8" is missing, idk what to do tbh
Want results from more Discord servers?
Add your server