If you are using mongoose try upgrading or downgrading the version you are using.
Otherwise try upgrading the mongodb driver.
Go to your Atlas cluster and make sure you have a primary. It is very unlikely that you do not have one so the error ReplicaSetNoPrimary is most likely another error that is wrongly misinterpreted. A different driver version might give a better error message or even not err at all.
(Off topic but causing a new issue, just to remind.)
I am unable to access my router dashboard panel (miui) to router.miwifi.com but http://192.168.31.1/ works fine! (It might not be the same for you, just in case )