mongodb compass URI does not have hostname, domain name and tld code example
Example: MongoParseError: URI does not have hostname, domain name and tld
You should encode your password, for example, my password
had # character in it
I used this site to convert # to hex which is 23
https://cryptii.com/pipes/hex-to-text
Now, after converting it you need to put it inside your js
file like this %23