-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
mongoose.createConnection TypeError: Cannot read property 'prepare' of undefined #10377
Comments
@IslandRhythms did you try with an NODE_ENV=development
NODE_PORT=8080
NODE_SECRET=dev_demo_node_secret
NODE_SESSION_SECRET=dev_demo_node_session_secret
MONGO_DB_PORT=27017
MONGO_DB_MAIN=readlatte
MONGO_DB_URI=mongodb://mongo:27017/
MONGO_ROOT_USERNAME=dev_demo_user
MONGO_ROOT_PASSWORD=dev_demo_pwd
MONGO_EXPRESS_ADMINUSERNAME=dev_demo_user
MONGO_EXPRESS_ADMINPASSWORD=dev_demo_pwd |
I connected to a live database just fine, something is wrong with your setup. I think specifically it is your connection string. |
How did you managed to connect, do you have mongodb installed on your machine or ran |
@IslandRhythms I have found the issue, it's a mistake on my part. Thanks for your help. |
We'll see if we can improve this error message, this error message is quite unhelpful. |
Opened an issue in the MongoDB driver ☝️ Going to remove this from our milestones but keep it open so we remember to make a note when the MongoDB driver team makes a new release. |
@vkarpov15 |
Do you want to request a feature or report a bug? bug
bug
What is the current behavior?
I'm getting this error:
on this call: https://github.com/speedtreammanga/read-latte/blob/7947c7ef29667d681ffdc60dc377b7ab4781d15e/express/src/config/connection/connection.ts#L21
If the current behavior is a bug, please provide the steps to reproduce.
repo: https://github.com/speedtreammanga/read-latte
steps:
cd <project root>
;docker-compose build
;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.
package.json => 5.12.14
|console.log(mongoose.verison) => 5.12.13
The text was updated successfully, but these errors were encountered: