title: nodejs error: module.js:340 throw err;
body: <p>I tried to run a sample server but I got error message on Windows. Then I tried to run it on my friend's machine, but it just went well, windows system too. I don't know what's happening.
  Let me show the source code and the error message:
  source code:</p>
  
  <pre><code>var http = require("http");
  
  http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World");
  response.end();
  }).listen(8888);
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>D:\test&gt;node server.js
  
  module.js:340
  throw err;
  ^
  Error: Cannot find module 'D:\test\server.js'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:906:3
  </code></pre>
  
  <p>Ps: <strong>server.js</strong> is the file to execute.</p>