Currently creating a nextjs app with mongodb and I’m currently getting the following error and it’s driving me nuts trying to solve it
Failed to compile ./node_modules/mongodb/lib/cmap/auth/gssapi.js:8:0 Module not found: Can't resolve 'dns' Import trace for requested module: ./node_modules/mongodb/lib/cmap/auth/defaultAuthProviders.js ./node_modules/mongodb/lib/index.js ./lib/mongodb.js ./pages/dashboard/index.js https://nextjs.org/docs/messages/module-not-found
any help would be great to avoid issues like this in future.
yarn add dns
but that wouldn’t install