My requirement is to load dummy data in new MongoDB Atlas Cluster and I am getting error when I try to run the script mentioned in the below link. Could you please suggest on how to overcome this and seed the DB.
Hello @Hendry_Ding and welcome to the MongoDB community forums.
I’m not a Node.js person, but that error usually means that you haven’t installed the Node module. Did you run npm install faker@5.5.3 yet? Note that this Node package was purposely broken by its creator a while back so you don’t want the latest version. Once you install the module you should have better luck in running things,
npm install is ran from your operating system prompt and not from inside mongosh. Once you install the package then you would run node <scriptname> from the command line, You need to make sure that the script has a valid connection string for your MongoDB instance in it for it to run.
Steeve mentions mjeneratejs in his post which is anohter NodeJS package that generates JSON data that could be imported into MongoDB.