Shared publicly  - 
 
node modules in git. Good or bad?

Discussion go!
1
Aldric Giacomoni's profile photoThomas Blobaum's profile photoJake Verbaten's profile photo
4 comments
 
Personally I think that rather then including node_modules in git we should use absolute versions in our package.json files. Failing that we need to either trust version changes don't break or include it git.

It's worth including node_modules somewhere in git anyway to gaurd against npm being down or the internet being down. That way we can still work offline more efficiently.
 
I think it's a waste of VCS space. If you're gonna work on a plane or or without connection, I think it's responsible to prepare.
 
It seems like a good idea, imo. you guard yourself against api changes of submodules aswell. For instance, if you install module x on one day which depends on module y, and the version number for y is not absolute in the package.json of module x, you may find installing the same version at a later date doesnt function when submodule y has changed the api. This means a simple 'npm install' may work 100 days in a row and then randomly break on day 101. Tracking down the issue can be difficult.
 
True. The Ruby community has setup a way to manage gems as well as gem versions when they are project dependencies