Locking dependencies with npm shrinkwrap - Amazon Elastic Beanstalk
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Locking dependencies with npm shrinkwrap

The Node.js platform runs npm install as the webapp user each time you deploy. When new versions of your dependencies are available, they're installed when you deploy your application, potentially causing the deployment to take a long time.

You can avoid upgrading dependencies by creating an npm-shrinkwrap.json file that locks down your application's dependencies to the current version.

$ npm install $ npm shrinkwrap wrote npm-shrinkwrap.json

Include this file in your source bundle to ensure that dependencies are only installed once.