One way to do this for a specific set of modules is to remove these modules from the dependencies section and create a prestart script containing all the modules that you prefer to install around the world.
A simple example might look something like this:
"scripts": { "test": "mocha", "prestart": "npm i -g mocha mysql bluebird" },
Instead of prestart you can use one of the other hooks, such as preinstall and prepare . Please note that this will not work with the packages you want to publish, and will require a bit more hacking.
Help when running scripts: https://docs.npmjs.com/misc/scripts
source share