title: With node.js, how to manage npm across modules?
body: <p>For example, I have following structure</p>
  
  <pre><code>main
      -- doTask1
          -- task1-1.js
          -- task1-2.js
      -- doTask2
          -- task2-1.js
          -- task2-2.js
  </code></pre>
  
  <p>If I run <code>npm install &lt;some package&gt;</code> in <code>doTask1</code>, a new directory <code>node_modules</code> is created in <code>doTask1</code>.</p>
  
  <p>Now in <code>doTask2</code>, I need to use the same package, do I need to run <code>npm install &lt;some package&gt;</code> in <code>doTask2</code> again? It will create another <code>node_modules</code> in <code>doTask2</code> which is duplicate. What's the correct way to manage this?</p>