I hope whoever is reading this is having a great day! I am currently trying to connect my mongodb Atlas to my React app using node.JS but I am getting the error TypeError: Cannot read property 'replace' of undefined at matchesParentDomain (uri_parser.js:24) at uri_parser.js:67
Hi there, I figured out it’s whenever I have any other outside functions. For example. I am trying to connect my MongoDB in another React function using the same methods:
I am getting the same error TypeError: Cannot read property 'replace' of undefined Is this because I’m trying to connect it within an exported function?? Like I literally have no idea why I can’t connect to it at all. I’ve tried without the async function as well and get the same thing.
Lastly, I have tried literally copy and pasting my previous main() function into a new document and simply calling main() from my new export default function AboutUsPage(){ and it still doesn’t work.