title: Using promises on Node.js on Windows
body: <p>How does one use promises on Node.js running on Windows? For the life of me I can't seem to get any example to work...</p>
  
  <p>For example something like this doesn't work: </p>
  
  <pre><code>var pinput = new Promise(
     function(fulfillPromise, breakPromise) {
       var btn = document.getElementById("button");
       var txt = document.getElementById("txt");
       btn.onclick = function() {
         fulfillPromise(txt.value);
       }
     }
  );
  
  pinput.whenOnly(function(value) { alert(value); });
  </code></pre>
  
  <p>Throwing in requires doesn't help either:</p>
  
  <pre><code>Promise = require('promise');
  </code></pre>
  
  <p>All I get is either:</p>
  
  <pre><code>ReferenceError: promise is not defined
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Error: Cannot find module 'Promise'
  </code></pre>
  
  <p>And I can't seem to find the promise from the latest API either...  (http://nodejs.org/docs/latest/api/)</p>
  
  <p>Me be puzzled. </p>