M220JS - Unable to connect to Atlas via mflix - npm start times out

Hi Kanika and other teachers,
I am unable to connect to Atlas, when I write the command npm start, the process hangs and eventually times out. Please help. I get the message below:

[nodemon] 1.19.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node ./index.js
Error: querySrv ETIMEOUT _mongodb._tcp.mflix-uitdk.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:202:19)
[nodemon] app crashed - waiting for file changes before starting…

Hi @Jai_33176,

Please check your connection string in .env file and make sure the syntax is correct and your firewall is disabled: you are able to connect to your cluster from your system.

If you are unable to resolve, please share the contents of .env file here.

Kanika

Thanks Kanika,
It seems to be working now, I think it was the internet connection. I had a VPN that I was using and I disabled it. Hopefully this problem will not occur again. - jr

1 Like