title: Lerna. Install dependencies to root project
body: <p>I have standard <code>Lerna</code> repository like this:</p>
  <pre><code>my-repo
   - package.json
   - packages
     - api
       - package.json
     - web-app 
       - package.json
  </code></pre>
  <p>If I need same dependency in both packages (for example <code>lodash</code>), then people in tutorials suggest to install it to both sub modules and then bootstrap project with with <code>lerna bootstrap --hoist</code> flag.</p>
  <p>Because of <code>--hoist</code> flag <code>lodash</code> dependency will be loaded only to root level <code>node_modules</code> but both sub-modules  will contain it as dependency in their appropriate <code>package.json</code></p>
  <p>But Node’s package resolution algorithm searches up the file tree looking for <code>node_modules</code> folder.</p>
  <p>So my question is why I can't just install common dependencies to root level project? Then <code>lodash</code> will be located under root's <code>node_modules</code>. And sub-modules (packages) will find it because Node will search up for <code>node_module</code> until the root of the file system is reached.</p>
  <p>At least it will help me to avoid using uncommon <code>lerna bootstrap --hoist</code>, as well as <code>lodash</code> dependency will be present only once at the top level <code>package.json</code> (and not twice: in <code>package.json</code> of both submodules)</p>