I canot connect to my Atlas Cluster for first time

I have followed all the instructions but always I have the same Error:


PS C:\Users\pablo\Desktop\mflix-js> npm test -t db-connection

server@1.0.0 test
jest --passWithNoTests “db-connection”

Determining test suites to run…Setup Mongo Connection
FAIL test/db-connection.test.js
● Test suite failed to run

TypeError: Cannot read properties of undefined (reading 'close')    

  17 | 
  18 |   async teardown() {
> 19 |     await this.global.mflixClient.close()
     |                                   ^
  20 |     await super.teardown()
  21 |   }
  22 | 

  at MongoEnvironment.teardown (test/config/mongoEnvironment.js:19:35)

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 38.7s
Ran all test suites matching /db-connection/i.
Teardown Mongo Connection
(node:5648) Warning: Accessing non-existent property ‘count’ of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:5648) Warning: Accessing non-existent property ‘findOne’ of module exports inside circular dependency
(node:5648) Warning: Accessing non-existent property ‘remove’ of module exports inside circular dependency
(node:5648) Warning: Accessing non-existent property ‘updateOne’ of module exports inside circular dependency


I´m doing it on visual studio

I have retried to make all the process thre times and always got the same

Some explanation: I´m doing this course using my first Atlas cluster from the Mongo Basic course, because when I try to make another new All of hte was of payment. Also I have already installed node.

Your course would have asked you to create the cluster with a specific name
I don’t think you can use m001 cluster.Only one cluster per project allowed
Create a new project and create your new cluster under it(mflix i think)

I make the new project and reinstall every thing:
Now i got this error


PS C:\Users\pablo\Desktop\mflix-js> npm test -t db-connection

server@1.0.0 test
jest --passWithNoTests “db-connection”

“jest” no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.


If translation is needed:

“jest” is not recognize as internal o external command, program or executable batch file.


Hi @Pablo_Torre,
Try installing Jest as a dev dependency.

npm install --save-dev jest

Hopefully, it will fix the issue.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

Hi, I had instaled jest, but now I have this error:

Error: Jest: Got error running globalSetup - C:\Users\pablo\Desktop\mflix-js\test\config\setup.js, reason: Cannot find module ‘@babel/plugin-transform-runtime’
Require stack:

  • C:\Users\pablo\node_modules@babel\core\lib\config\files\plugins.js
  • C:\Users\pablo\node_modules@babel\core\lib\config\files\index.js
  • C:\Users\pablo\node_modules@babel\core\lib\index.js
  • C:\Users\pablo\node_modules\jest-snapshot\build\InlineSnapshots.js
  • C:\Users\pablo\node_modules\jest-snapshot\build\State.js
  • C:\Users\pablo\node_modules\jest-snapshot\build\index.js
  • C:\Users\pablo\node_modules\jest-runtime\build\index.js
  • C:\Users\pablo\node_modules@jest\core\build\cli\index.js
  • C:\Users\pablo\node_modules@jest\core\build\jest.js
  • C:\Users\pablo\node_modules\jest-cli\build\cli\index.js
  • C:\Users\pablo\node_modules\jest-cli\build\index.js
  • C:\Users\pablo\node_modules\jest-cli\bin\jest.js
  • C:\Users\pablo\node_modules\jest\bin\jest.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at resolve (node:internal/modules/cjs/helpers:108:19)
    at tryRequireResolve (C:\Users\pablo\node_modules@babel\core\lib\config\files\plugins.js:157:9)
    at resolveStandardizedNameForRequrie (C:\Users\pablo\node_modules@babel\core\lib\config\files\plugins.js:195:19)
    at sync (C:\Users\pablo\node_modules@babel\core\lib\config\files\plugins.js:224:12)
    at sync (C:\Users\pablo\node_modules\gensync\index.js:182:19)
    at C:\Users\pablo\node_modules\gensync\index.js:210:24
    at Generator.next ()
    at resolvePlugin (C:\Users\pablo\node_modules@babel\core\lib\config\files\plugins.js:83:17)
    at resolvePlugin.next ()

I miss something during the installation?

I have to make a cuestion:
When I unzip m220/mflix-js.zip, it´s supposed that this unzips a few archives with some folders (README, build, .babelrc …) , or a single folder with these archives and folders (m220/mflis-js)?

Hi @Pablo_Torre, yes it is the expected behavior, all the folders will appear wherever you unzip them.

If you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
MongoDB