-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.6.0, 5.7.0
-
Component/s: Core
What problem are you facing?
When using NextJS 13 and the NodeJS driver for MongoDB, whenever I use:
import {MongoClient} from "mongodb"
I get an error:
- error ./node_modules/mongodb/lib/cmap/auth/gssapi.js:4:0
Module not found: Can't resolve 'dns'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/mongodb/lib/index.js
What driver and relevant dependency versions are you using?
I tried using both versions 5.6 and 5.7
Steps to reproduce?
Use the import statement where NextJS reads the file.
Troubleshooting:
I upgraded the driver from 5.6 to 5.7
I deleted the node_modules and .next directories and rebuilt them