Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: next-auth module completely broken with MODULE_NOT_FOUND next/server.js when doing folder structure instead of app #2033

Open
marcomnrq opened this issue Nov 25, 2024 · 4 comments

Comments

@marcomnrq
Copy link

Provide environment information

Happening in the latest version available: [email protected].

Describe the bug

On public and protected routes, the tRPC calls made from the client fail indicating the following error:
Screenshot 2024-11-24 at 7 30 42 PM

 Error: Failed to load external module next-auth: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/marcomnrq/VSCode Projects/examplebug/node_modules/next/server' imported from /Users/marcomnrq/VSCode Projects/examplebug/node_modules/next-auth/lib/env.js
Did you mean to import "next/server.js"?

Reproduction repo

n/a

To reproduce

Create a new app using the following settings.
Screenshot 2024-11-24 at 7 25 09 PM

Start the app with npm run dev and see the console / logs.

Additional information

Happy to help debugging this further, but i think it has to do with the import in this file. Will try to post some findings in this issue.
Screenshot 2024-11-24 at 7 32 33 PM

@marcomnrq
Copy link
Author

This looks to be related > vercel/next.js#64529

@visheshd
Copy link

Getting this with our codebase as well. Just tried to update to the latest t3-boilerplate.

@BrentonBeltrami
Copy link

This is related/duplicate of #2027.
I am also getting this error.

@ari-party
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants