File validateLab1 doesn't exist

hello can someone help me please ?

i try the lab and when i want to load the validateLab1 file i have this :
MongoDB Enterprise Cluster0-shard-0:PRIMARY> load(“validateLab1.js”)
2019-10-18T10:52:53.671+0200 E - [js] file [validateLab1.js] doesn’t exist
2019-10-18T10:52:53.671+0200 E QUERY [js] Error: error loading js file: validateLab1.js :

@ajulio4 you’re supposed to run it in the Linux shell, not in mongo. Suggest you look at the instructions again.

1 Like

Also make sure you do it from the directory where the file is located.


Hi @ajulio4,

Please follow the steps mentioned below:

  1. Download m121/ from the handouts section in the Lab - $match, unzip the contents of the zip file.
  2. Then navigate to the chapter1 folder within the m121 directory that you have downloaded in step 1. The chapter1 folder should contain the validateLab1.js file, otherwise you will get the error.
  3. Now connect to the cluster using the following connection string:

mongo “mongodb://,,” --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

  1. Then create the pipeline and assign it to variable pipeline as shown below:

var pipeline = [ { $match: { … } } ]

  1. Then from within the shell, follow the steps mentioned in the Lab - $match.

Please let me know, if you have any questions.


1 Like

After doing all of the steps above, i m not able to use the video db for chapter2 Lab1. Any suggestions?

@Nithyabharathy I have noticed that you’ve asked the same question in three other old threads.
Going forward, please post your question once and do so in your own thread. Helps to keep things tidy.

1 Like