Hey, Probably a somewhat n00b question, but on sites of your size that build and release as often as yours do - how do you manage your npm and bower packages? Currently we .gitignore our node_modules and bower_components directories, but I feel we should break that SPOF we have with npm and bower's servers, in the event they're unavailable when our CI is running a build/release.
I had considered checking the packages into git, but;
- I'm sure this is frequently advised against [citation needed].
- Some packages such as karma-runner/karma-phantomjs-launcher perform a tailored installation for the OS
npm install
was run from (egphantomjs
for Windows if installed when on Windows) - so if developer A on Windows runsnpm install
and checks it into git, CI Server B on Linux will be failing builds.
Is this SPOF something you're even concerned about? And if so, how do you manage it please?
Thanks a lot guys appreciate it.
Jamie.
I'm concerned about it. Not just for SPOFs but also regarding build times when fetching dependencies plus the very unnecessary amount of bytes over the wire.
We haven't found a good solution for it. A registry is a decent solution but we don't currently have the resource to set up and maintain one.
Currently, we check in bower deps but don't check in npm. Our bower dependencies don't get updated so often and are pretty light. npm is the opposite and I don't want to bloat our repos by including hundreds of mbs of modules + deal with the constantly changing diffs.
Fwiw I was very close to switching to checking them in at one point but @makeusabrew more or less convinced me not to. I'm still glad we didn't, although I can understand the arguments for both sides.