Reason for error:
This usually happens due to different versions between mongodump or mongoexport vs your MongoDB server. For example, you are exporting or dumping using version 3.6 and your MongoDB server is on version 4.0
Possible solution of this error:
First, solution is use same version as version of your mongoDB server.
Second, solution is use –forceTableScan in your command
mongodump --forceTableScan -d database_name -o target_directory
Also Read : Start & Stop Mongo DB Server
mongoexport --forceTableScan -d dbname -o Mongo.json