-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Error: Cannot find module 'next/headers'" when accessing "api/auth/signin" #5743
Comments
I'm getting the exact same error, but while trying to implement the Credentials provider. |
I fixed it by going back to V4.15.1 |
All right that fixed that issue but now I am getting: |
Getting the same error both when passing providers and when the providers array is empty. |
@Supergamer1337 @edgarlcs seems like Next-Auth requires Next.js version 13. Updating Next fixed the problem for me on the newest version of Next-Auth. Really weird that it didn't say anything about Next version upon 'npm install'. |
For now, |
same problem with me |
Same problem stuck with "error - Error: Cannot find module 'next/headers'" |
Shouldn't it be a breaking change then, and so v5? Looks that way. The fact it might not work for Next 13 (fair enough, experimental) shouldn't mean it should be the same for Next 12.x. |
Sorry for the inconvenience, a patch is coming, you can test it out with #5745 (comment) please report back if it worked for you! 馃檹 I plan to release this very 馃敎 |
TL;DR
|
Should be fixed in |
I am still getting this error on |
I'm getting this on |
4.18.7 and still the same error... What is going on??? |
If you get this whilst NOT on the sign in page I got this error on |
Please don't comment on already closed issues, they are not monitored. You can add your reproduction at #6559 Read #6559 (comment) first. As #5743 (comment) pointed out, you might have misconfigured |
Question 馃挰
Hello I am trying to implement Facebook Login but I am getting this error:
`error - Error: Cannot find module 'next/headers'
Require stack:
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at Function.mod._resolveFilename (/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/build/webpack/require-hook.js:27:32)
at Function.mod._resolveFilename (/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/build/webpack/require-hook.js:27:32)
at Function.mod._resolveFilename (/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/build/webpack/require-hook.js:27:32)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next-auth/next/index.js:15:16)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next-auth/next/index.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next-auth/index.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/.next/server/pages/api/auth/[...nextauth].js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/server/next-server.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/server/next.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/server/lib/start-server.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/cli/next-dev.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/lib/commands.js',
'/Users/edgarlcs/Documents/GitHub/rifadisimo/rifadisimo/node_modules/next/dist/bin/next'
]
}`
How to reproduce 鈽曪笍
Here is the code if you want to try by yourself https://github.com/edgarlcs/rifadisimo
Contributing 馃檶馃徑
No, I am afraid I cannot help regarding this
The text was updated successfully, but these errors were encountered: