TehCheese
TehCheese16mo ago

Deno hanging when trying to connect with Mongoose

When I try to connect to MongoDB using Mongoose the whole process just hangs until eventually timing out. I'm using a remote database with a user and password, and I know the URI is correct because I have used the same one on node.js projects. just
await mongoose.connect(`${env["MONGO_URI"]}`);
await mongoose.connect(`${env["MONGO_URI"]}`);
And I know it's getting the URI from the env file, I logged it to console There's no errors, other than the timeout error.
error: Uncaught (in promise) MongooseServerSelectionError: connection timed out
at _handleConnectionErrors (file:///C:/Users/che/Documents/GitHub/Guin/node_modules/.deno/mongoose@7.5.0/node_modules/mongoose/lib/connection.js:805:11)
at NativeConnection.openUri (file:///C:/Users/che/Documents/GitHub/Guin/node_modules/.deno/mongoose@7.5.0/node_modules/mongoose/lib/connection.js:780:11)
at eventLoopTick (ext:core/01_core.js:197:13)
at async file:///C:/Users/che/Documents/GitHub/Guin/Main.ts:23:1
error: Uncaught (in promise) MongooseServerSelectionError: connection timed out
at _handleConnectionErrors (file:///C:/Users/che/Documents/GitHub/Guin/node_modules/.deno/mongoose@7.5.0/node_modules/mongoose/lib/connection.js:805:11)
at NativeConnection.openUri (file:///C:/Users/che/Documents/GitHub/Guin/node_modules/.deno/mongoose@7.5.0/node_modules/mongoose/lib/connection.js:780:11)
at eventLoopTick (ext:core/01_core.js:197:13)
at async file:///C:/Users/che/Documents/GitHub/Guin/Main.ts:23:1
9 Replies
lcasdev
lcasdev16mo ago
cc @.bartlomieju
TehCheese
TehCheeseOP16mo ago
reactiontothatinformation
bartlomieju
bartlomieju16mo ago
Which Deno version do you use @tehcheese ?
TehCheese
TehCheeseOP16mo ago
The latest, I believe Let me check
TehCheese
TehCheeseOP16mo ago
No description
bartlomieju
bartlomieju16mo ago
Thanks, could you please open an issue in the repo about this problem?
TehCheese
TehCheeseOP16mo ago
Okay..
TehCheese
TehCheeseOP16mo ago
GitHub
Deno incompatibility with Mongoose npm package · Issue #20391 · den...
deno 1.36.4 (release, x86_64-pc-windows-msvc) v8 11.6.189.12 typescript 5.1.6 import mongoose from "npm:mongoose"; await mongoose.connect("URI"); That's all my code, the ent...
bartlomieju
bartlomieju16mo ago
Thanks, we'll look into it!

Did you find this page helpful?