anchor.diff:  Staging failed: Buildpack compilation step failed
   </pre>
   
  -## <a id='vendoring'></a>Vendor App Dependencies ##
  +## <a id='using_npm_or_yarn'></a>Using NPM or Yarn ##
   
  -To vendor dependencies for an app using the Node.js buildpack, run `npm install` from your app directory. This command vendors dependencies into the `node_modules` directory of your app directory.
  +By default, the Node.js buildpack assumes you are using NPM. If you would like to use [Yarn](https://yarnpkg.com/) instead, you must provide a [`yarn.lock`](https://yarnpkg.com/lang/en/docs/yarn-lock/) in your top-level app directory.
  +
  +## <a id='vendoring'></a>Vendoring App Dependencies ##
  +
  +To vendor dependencies for an app using the Node.js buildpack, run `npm install` (or `yarn install`, if you are using Yarn) from your app directory. This command vendors dependencies into the `node_modules` directory of your app directory.
   
   For example, the following example vendors dependencies into the `my-nodejs-app/node_modules` directory:
   
  
positive.code: 
  The `cf push` command uploads the vendored dependencies with the app.
  
  <p class='note'><strong>Note</strong>: For an app to run in a disconnected environment, it must vendor its dependencies.
  For more information, see <a href="https://github.com/cf-buildpacks/buildpack-packager/blob/master/doc/disconnected_environments.md">Disconnected environments</a>.</p>
  
  ### <a id='yarn_disconnected'></a>Using Yarn in a Disconnected Environment ##
  
  Versions 1.5.28 and later of the Node.js buildpack include the ability to use the package manager [Yarn](https://yarnpkg.com/) in a disconnected environment. To do so, you must mirror the Yarn registry locally:
  
  <pre class="terminal">
  $ cd APP-DIR
  
negative.code: $ yarn install
  </pre>
  
  When you push the app, the buildpack looks for an `npm-packages-offline-cache` directory at the top level of the app directory.
  If this directory exists, the buildpack runs Yarn in offline mode. Otherwise, it runs Yarn normally, which may require an Internet connection.
  It is not strictly necessary to provide a `node_modules` directory when running Yarn in offline mode, as the offline cache will provide the dependencies.
  
  For more information about using an offline mirror with Yarn, see the [Yarn Blog](https://yarnpkg.com/blog/2016/11/24/offline-mirror).
  
  