-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Closed
Copy link
Labels
underlying library issueThis issue is a bug with an underlying library, like the MongoDB driver or mongodb-coreThis issue is a bug with an underlying library, like the MongoDB driver or mongodb-core
Description
Do you want to request a feature or report a bug? bug
bug
What is the current behavior?
I'm getting this error:
/app/express/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:182
nodejs_1 | authProvider.prepare(handshakeDoc, authContext, callback);
nodejs_1 | ^
nodejs_1 | TypeError: Cannot read property 'prepare' of undefined
nodejs_1 | at prepareHandshakeDocument (/app/express/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:182:18)
nodejs_1 | at performInitialHandshake (/app/express/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:87:3)
nodejs_1 | at /app/express/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:36:5
nodejs_1 | at callback (/app/express/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:280:5)
nodejs_1 | at Socket.connectHandler (/app/express/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:325:5)
nodejs_1 | at Object.onceWrapper (node:events:513:28)
nodejs_1 | at Socket.emit (node:events:394:28)
nodejs_1 | at Socket.emit (node:domain:470:12)
nodejs_1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1119:10)
If the current behavior is a bug, please provide the steps to reproduce.
repo: https://github.com/speedtreammanga/read-latte
steps:
- clone repo;
- create a .env file at the root of the project with the environment variables used in my docker-compose file;
- run
cd <project root>; - run
docker-compose build; - run
docker-compose run;
My tsconfig.json file
What is the expected behavior?
mongoose should be able to connect to my mongodb without any issue.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
- nodejs: using docker image node:16-alpine
- mongoose:
package.json => 5.12.14|console.log(mongoose.verison) => 5.12.13 - mongodb: using the mongo docker image
Metadata
Metadata
Assignees
Labels
underlying library issueThis issue is a bug with an underlying library, like the MongoDB driver or mongodb-coreThis issue is a bug with an underlying library, like the MongoDB driver or mongodb-core