You might want to use a post-install script, and then install them.
You can programmatically install objects using the npm module .
So you can do something like this:
var npm = require('npm'); // make sure npm is in your package.json! npm.load({/* some object properties, if needed */}, function(err) { if (err) {return handleError(err)} if (usingMongoDB) { npm.commands.install(['mongodb'], function(err){ if (err) {return handleError(err)} console.log('mongodb successfully installed'); }); });
Now I have never done anything like this, so I recommend looking at the documentation for software npm install , as well as load .
source share