Cannot connect to MongoDB because of wrong URI
Solution 1:
The error Accessing non-existent property 'MongoError' of > module exports inside circular dependency
is caused by a bug in mongodb 3.6.4
It's already reported here
Back to version 3.6.3 works for me:
npm uninstall mongodb --save
Install version 3.6.3
npm i [email protected]
Solution 2:
For everyone searching about this warning, don't worry, it's just a version bug, and was already reported. Just uninstall the 3.6.4 version and install the version 3.6.3 as answered on @kmgt answer.
More details:
https://developer.mongodb.com/community/forums/t/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency/15411
https://github.com/Automattic/mongoose/issues/9900