Uncaught Assertion Error | v0.20.0
See original GitHub issue$ deno --version
deno 1.5.4 (bc79d55, release, x86_64-unknown-linux-gnu)
v8 8.8.278.2
typescript 4.0.5
db.ts
import { MongoClient } from "https://deno.land/x/mongo@v0.20.0/mod.ts";
const client = new MongoClient();
client.connect('mongodb://localhost:27017');
const db = client.database('test');
$ deno run --allow-net --allow-read --allow-write --allow-plugin --allow-env --unstable db.ts
Check file:///workspace/db.ts
error: Uncaught AssertionError
    throw new AssertionError(msg);
          ^
    at assert (asserts.ts:152:11)
    at MongoClient.database (client.ts:48:5)
    at db.ts:6:19
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
 Top Results From Across the Web
Top Results From Across the Web
Uncaught Assertion Error | v0.20.0 · Issue #133 - GitHub
hi, this solved for me import { MongoClient } from "https://deno.land/x/mongo@v0.20.0/mod.ts"; const client = new MongoClient(); await ...
Read more >error: Uncaught (in promise) AssertionError - Stack Overflow
I found that in the mongo.ts file of the project, there is a line like this: client.connect(Deno.env.get("MONGODB_URI") || "");.
Read more >assertion-error - npm
Error constructor for test and validation frameworks that implements standardized AssertionError specification.. Latest version: 2.0.0, ...
Read more >assertion failed: file:/home/jesus/flutter/packages/flutter/lib/src ...
I had this assertion failure happening because I was using a MouseRegion subtree, where the onEnter / onExit handlers were throwing an uncaught...
Read more >Node.js v19.3.0 Documentation
All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError(options) #. Added in: v0.1.21. options < ...
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
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
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

hello,the resolve is to use
Did you use the win os? If true, you can try 127.0.0.1 to replace the ‘localhost’.