Mgenerate is no longer included with mtools

We are advise to use the following tool as a replacement is this correct:

Please use https://www.npmjs.com/package/mgeneratejs instead.

Regards

@ John_70088

Yes, that’s the current version of ‘mgenerate’. However, note that ‘mgenerate’ is not a required tool for this course – it’s just a quick and easy way to generate some test data. So, if you have problems setting up or running ‘mgenerate’, you might want to simply create some test data directly using the shell

Note that ‘mgenerate’ is a Node.js application, so you’ll need to have Node and its supporting software installed to run ‘mgenerate’. Good luck.

Hi @DHz
I just getting to this point of class m312 and have run into this same issue. I have installed mgeneratejs using command:
sudo npm install -g mgeneratejs

but when I run the mgeneratejs command I get the following error:

vagrant@m312:/shared$ mgeneratejs /shared/schema.json

/usr/local/lib/node_modules/mgeneratejs/node_modules/chance/chance.js:309
for (const exclusion of options.exclude) {
^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/mgeneratejs/lib/index.js:3:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)

I have not been able to get it to work. You have mentioned that this is not required for this course but you must be assuming that everyone would be able to manually generate test data. This should be fixed in the course and have new instruction added to the course material.

Thanks
Dinis Gomes

Hi @Dinis_90611,

Here since you are already in the /shared directory, you can use the following command:

mgeneratejs schema.json

Moreover, we will definitely update this in the lecture notes so that the users do not get confused.

Thanks for notifying this!!

Please let me know, if you have any questions.

Thanks,
Sonali