I love Bundler, it\'s great at dependency management. I love npm, installing node packages is easy! I have a nodejs app and would love to be able to specify my apps de
As of Npm version 1.1.2 , there's a new command npm shrinkwrap which creates an npm-shrinkwrapped.json
file, analogous to Gemfile.lock
. It's important to make one, to prevent software rot (see Bundler's rationale). Particularly as Nodejs has such a fast moving community.
While bundle install
creates a Gemfile.lock
automatically, npm install
won't create npm-shrinkwrapped.json
(but will use it when it exists). Hence you need to remember to use npm shrinkwrap
.
Read a full guide at http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/