I also feel your pain ... If you are actively developing a new nodejs project where you wish to always use the latest release of all your upstream npm packages then avoid mentioning any dependencies in your package.json file until your are ready to distribute. This slowdown we experience is due to unnecessarily storing these upstream packages inside your project directory in dir /node_modules/ which is not useful until your distribute your app.
Here I mention no up stream packages in this package.json file :
{
... other tags here ...
"dependencies" : {
}
}
Also install your project's upstream npm packages globally using the -g flag as in :
npm install -g some_cool_package
so these packages are usable by your project yet do not live inside its root dir bogging down your productivity. Concomitantly, do not issue
npm install
while inside your nodejs project root dir since all your upstream npm packages live in the global install directory as defined by the environment variable NODE_PATH
echo $NODE_PATH
which has a value akin to
/home/stens/node-v5.3.0/lib/node_modules
That is the global npm package storage location which gets populated when you install npm packages using the -g flag . That $NODE_PATH will get bloated with all your upstream npm packages instead of getting stored inside your nodejs app /node_modules/ directory
Develop away in this mode free of this baggage ... when you are ready to distribute then do populate your package.json file with your upstream npm packages and issue your npm install to populate the dir /node_modules/ ... of course add your node_modules to your .gitignore so that dir is not sent into git
You can also do this to your existing nodejs apps by emptying out the "dependencies" tag of your package.json file and deleting directory /node_modules/ ... until your are ready to distribute