We're aiming for deterministic package installs and using the tools the package manager,
npm, provides. Please install npm v3.x or v4.x (not v1.x or 2.x or 5.x or 6.x). For a consistent package state, try starting with:
npm i -g npm@4 /bin/rm -rf node_modules npm install
Upgrading a package (or adding a new one) should go as follows:
npm --version # should give you v3.10.10 or above (does not work with v1 or v2, and there's a bug in v3.10.8-9) npm i --no-optional firstname.lastname@example.org --save(-dev) npm shrinkwrap --dev # git review
Now everyone's happy and the patch got merged. Go to the deploy repo and:
git pull origin master git submodule update --init cd src/ git checkout sha-of-the-above-commit cd .. rm -rf node_modules/ npm i --no-optional git status # verify only what's expected got changed git review
Note that all the
--no-optional business here is because
service-runner > bunyan > dtrace-provider is an optional binary dependency that we want to avoid putting in the deploy repo.
If you're interested, at this point you can run
npm i -g removeNPMAbsolutePaths and then
removeNPMAbsolutePaths . to remove unnecessary local information like the install path.