Next.js Discord

Discord Forum

next-auth version & compatibility issues

Unanswered
Morelet’s Crocodile posted this in #help-forum
Open in Discord
Avatar
Morelet’s CrocodileOP
my package.json file has "next": "^14.0.4", "next-auth": "^4.24.5" (both the latest versions of next and next-auth) but when i run i get this error about a library called oidc-token-hash trying to get the node version, but since i'm running in a browser obviously there is no node environment so it crashes the app. Trying to use the next-auth 5.0.0-beta.4 release gives me the error that there isn't any exports main defined in next-auth's package.json, but there is:
"type": "module",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.js"
},
...
my compilerOptions in tsconfig.json are fine too, target and module are both "ESNext" and moduleResolution is "Node". Anyone know how to get around this, is it because i'm using next-auth wrong that this is happening or is this just classic dependency hell?

Message #discussions

0 Replies