Replies: 5 comments 3 replies
-
Did you get anything here yet? I have this exact same error... |
Beta Was this translation helpful? Give feedback.
-
Same here, with same environment (pages architecture) "next-auth": "^5.0.0-beta.11" |
Beta Was this translation helpful? Give feedback.
-
I fixed it by using "next": "14.1.4" |
Beta Was this translation helpful? Give feedback.
-
i like the comment in
|
Beta Was this translation helpful? Give feedback.
-
is there any workaround for that? why should I go back to 14.1.4 for that? :( |
Beta Was this translation helpful? Give feedback.
-
I have been trying to use the new auth.js so I have "next": "^14.1.0",
"next-auth": "^5.0.0-beta.11", I am still using pages though as well. I am trying to migrate from using Next.js 13.4 and MSAL to using next-auth. I have an auth.ts, auth.config.ts, my nextauth api and a middleware. I keep getting this error though while trying to login or calling getSession() as it seems when my app hits the api/auth/error I get a 500 and the error reads:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/node_modules/next/server' imported from /node_modules/next-auth/lib/env.js
Did you mean to import "next/server.js"?
I have tried looking everywhere but can't find any information about this error and what might be causing it. Hopefully I can find someone here who knows what the deal might be. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions