I wanted to set up a Vagrant instance with node.js and some specific packages pre-installed. I found a Chef cookbook to install node and after a bit of work have a cookbook that will install arbitrary node packages through npm. I based this heavily on balbeko’s chef-npm cookbook with modifications to accept a data bag list of npm packages.

Any packages in this list will be installed by Chef.

Behold! My first Chef cookbook.