npm install doesn't create node_modules dir : <p>I have a node js application. In package.json I inserted the dependences, but when I execute 'npm install' the node_modules dir has a strange structure:</p>

<p>the dependences of my dependency are installed in the node_modules of my application. An example.
Consider this dependency graph</p>

<pre><code>foo
-- a
+-- b
   -- c
   +-- d
      -- e
      -- f
         -- g
</code></pre>

<p>I expected this folder structure: </p>

<pre><code>foo
 +--node_modules
             -- a
             -- b
                +--node_modules
                           -- c
                           +-- d
                              +--node_modules
                                          -- e
                                          -- f
                                          +--node_modules
                                                      -- g
</code></pre>

<p>Instead all modules are installed in </p>

<pre><code>foo
 +--node_modules
          -- a
          -- b
          -- c
          -- d
          -- e
          -- f
          -- g
</code></pre>
