ssible to have <code>a/node_modules/b/node_modules/a</code> if the two
&quot;a&quot; packages are different versions.  However, without repeating the
exact same package multiple times, an infinite regress will always be
prevented.</p>
<p>Another optimization can be made by installing dependencies at the
highest level possible, below the localized &quot;target&quot; folder.</p>
<h4 id="example">Example</h4>
<p>Consider this dependency graph:</p>
<pre><code>foo
+-- blerg@1.2.5
+-- bar@1.2.3
|   +-- blerg@1.x 