-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Webpack 5 <> NextAuth - Can't resolve mongodb for webpack5 #25304
Labels
bug
Issue was opened via the bug report template.
Comments
@timneutkens this was related to the |
This and another tricks not work for me =/ |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.2.2
What version of Node.js are you using?
14.15.0
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
When running
yarn run build
in the provided reproduction repo - I receive the error -ModuleNotFoundError: Module not found: Error: Can't resolve 'mongodb'
- we do not have this issue with webpack4 where we are using the following conditionalExpected Behavior
should build and work as it does locally. I logged this in that long thread that where y'all asked for anyone having trouble migrating from 4 => 5 and it must have gotten lost in the shuffle...reason I'm logging this again is we're running in to issues with other upgraded dependencies requiring webpack5.
To Reproduce
https://github.com/followbl/webpack5-next-auth
Pull down and run
yarn run build
The text was updated successfully, but these errors were encountered: