title: Node worker thread can't load external module?
body: <p>I'm trying to multi-thread a cpu-intense job on my server. I'm using webworker-threads.</p>
  
  <p>Server.js: (the relevant parts)</p>
  
  <pre><code>var Worker = require('webworker-threads').Worker;
  function doWork(req, res)
  {   
      console.log("connection received");
      var fibo = new Worker('plainworker.js');
  
      fibo.onmessage = function (event) {
          res.json('fib(10) = ' + event.data);
      };
  
      fibo.postMessage(10);
  }
  </code></pre>
  
  <p>plainworker.js:</p>
  
  <pre><code>var _ = require('underscore'); ///////////// &lt;---- PROBLEM LINE
  
  function fibo (n) {
            return n &gt; 1 ? fibo(n - 1) + fibo(n - 2) : 1;
          }
  onmessage = function (event) {
    postMessage(fibo(event.data));
  }
  </code></pre>
  
  <p>So I've noticed that if I have a module loaded in my plainworker.js file then it freaks out and stalls. If I remove this line then everything works ok. Problem is, I want to use underscore within my worker...</p>
  
  <p>Does anyone have experience with either threads-a-gogo or webworker-threads and can tell me if they have successfully loaded an external module WITHIN the worker thread?</p>