This is my string
const uri = 'mongodb+srv://ad:xyz@abc-2xyzs.mongodb.net/test?retryWrites=true&w=majority'
const client = new MongoClient(uri);
I'm getting the error
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
at validateString (internal/validators.js:117:11)
.
.
.
code: 'ERR_INVALID_ARG_TYPE'
I have tried to parse url. But nothing seems to be working