Mongo Error on Deno runtime
See original GitHub issueHello I have tried to run a project on deno, but I receive the following error when trying to run it using “deno”
error: Uncaught Error: MongoError: "Connection failed: Connection refused (os error 111)"
throw new MongoError(`Connection failed: ${e.message || e}`);
^
at MongoClient.connect (client.ts:93:15)
at async db.ts:5:12
Note:
I have tried it several times but the problem still persists.
Thanks in advance
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Mongo Error on Deno runtime · Issue #177 - GitHub
Hello I have tried to run a project on deno, but I receive the following error when trying to run it using "deno"...
Read more >/src/error.ts | mongo@v0.28.0 | Deno
import * as mongo from "https://deno.land/x/mongo@v0.28.0/src/error.ts";. Deno Logo. Why Deno? Develop LocallyDeploy GloballyCompare to Node.jsBenchmarks.
Read more >How to Setup and Use MongoDB with Deno 2022 - CodevoWeb
Step 4 – Connect Deno to MongoDB Server Now that we have the MongoDB Docker container running, let's create a utility function to...
Read more >Getting Started with Deno & MongoDB
Deno is a “modern” runtime for JavaScript and TypeScript that is built in ... If the request doesn't have a body it will...
Read more >Deno app getting "Connection failed: Connection refused (os error ...
Where is Mongo running? Is it possible it's trying to connect over IPv6 but Mongo is only listening on IPv4? asyrique ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If you used os is window. Try replace localhost with 127.0.0.1
Thanks for the reply
I have allocated a separate module for database namely db.ts
Please note that, I did successfully launched my project but after a few re-run deno stopped creating the server and currently it is showing the above error
Thank you