Chapter 1: Failed to import people.json

Hi guys1

I am running this command:

mongoimport --drop -c restaurants --uri mongodb+srv:// restaurants.json

But it ends with this error message:

|2022-10-17T10:51:11.384+0100|Failed: open restaurants.json: no such file or directory|
|2022-10-17T10:51:11.388+0100|0 document(s) imported successfully. 0 document(s) failed to import.|

Does anybody know what should I do?

Give full path of your .json file or cd to the directory where this file is residing and try to run import again

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.