Error connecting to MongoDB Atlas
Hello, I'm trying to connect to MongoDB Atlas via
My code:
mongoose (npm:mongoose) but encountered the following error: My code:
mongoosenpm:mongooseerror: Uncaught MongoAPIError: Server record does not share hostname with parent URI
at resolveSRVRecord (file:///home/farish/.cache/deno/npm/registry.npmjs.org/mongodb/4.14.0/lib/connection_string.js:63:19)
at async file:///home/farish/.cache/deno/npm/registry.npmjs.org/mongodb/4.14.0/lib/mongo_client.js:123:31import mongoose from 'npm:mongoose';
await mongoose.connect(
'mongodb+srv://user:pass@main.pj9zc0r.mongodb.net/?retryWrites=true&w=majority',
);