I\'m wondering if we should be tracking node_modules in our repo or doing an npm install when checking out the code?
I would recommend against checking in node_modules because of packages like PhantomJS and node-sass for example, which install the appropriate binary for the current system.
This means that if one Dev runs npm install
on Linux and checks in node_modules – it won't work for another Dev who clones the repo on Windows.
It's better to check in the tarballs which npm install downloads and point npm-shrinkwrap.json
at them. You can automate this process using shrinkpack.