How can I solve this error


Chapter 1: Driver Setup
MongoClient

how can I solve this

Hi @pruthviraj_44785

Can you confirm what version of Node you are running ? It should be version 10 or later.
Can you also review your MFLIX_DB_URI in your .env file ? This should be your Atlas cluster details and you should ensure that your Atlas cluster is running.

Let me know if these help resolve your issue, if not we can try some further steps.

Kindest regards,
Eoin

  1. node version is it is v11.12.0
  2. yes I have changed MFLIX_DB_URI and imported data in my cluster.
  3. Yes my atlas cluster is also running.
    Then also it is giving error like this :-
    FAIL test/lessons/mongoclient.spec.js (12.882s)
    MongoClient
    โœ“ Client initialized with URI (2188ms)
    โœ• Client initialized with URI and options (475ms)
    โœ“ Database handle created from MongoClient (1832ms)
    โœ• Collection handle created from database handle (448ms)

โ— MongoClient โ€บ Client initialized with URI and options

TypeError: Cannot read property 'close' of undefined