title: TypeScript compilation error TS5037: Cannot compile external modules unless the '--module' flag is provided
body: <p>Cannot compile any TS+node.js project including listed in samples <a href="http://typescript.codeplex.com/sourcecontrol/latest#samples/imageboard/README.txt">http://typescript.codeplex.com/sourcecontrol/latest#samples/imageboard/README.txt</a></p>
  
  <p>Always get the following error: </p>
  
  <p>error TS5037: Cannot compile external modules unless the '--module' flag is provided.</p>
  
  <p>compiler's version: 0.9.1.0</p>
  
  <p>For example, the project consists of just  single file app.ts:</p>
  
  <hr>
  
  <pre><code>///&lt;reference path="./node_definitions/node.d.ts" /
  
  import http = require("http")
  
  http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
  }).listen(1337, 'localhost');
  console.log('Server running at http://localhost:1337/');
  </code></pre>
  
  <hr>