title: Error running express with node
body: <p>I'm trying to start a very simple server on my Mac so I can access a file from localhost.</p>
  
  <p>I have node and express installed and this is all that it is in my server file.</p>
  
  <pre><code>var express = require('express'),
  app = express();
  
  app.use(express.static(__dirname, '/'));
  
  app.listen(8080);
  
  console.log("App listening on port 8080");
  </code></pre>
  
  <p>When I try to do:</p>
  
  <pre><code>node server
  </code></pre>
  
  <p>I get this as a response:</p>
  
  <pre><code>/Users/mt_slasher/node_modules/express/node_modules/serve-static/index.js:47
  var opts = Object.create(options || null)
                  ^
  TypeError: Object prototype may only be an Object or null: /
      at Function.create (native)
      at Function.serveStatic (/Users/mt_slasher/node_modules/express/node_modules/serve-static/index.js:47:21)
      at Object.&lt;anonymous&gt; (/Users/mt_slasher/Desktop/My Projects/Basket/Site/server.js:4:23)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Function.Module.runMain (module.js:501:10)
      at startup (node.js:129:16)
      at node.js:814:3
  </code></pre>
  
  <p>I've run this same file on a Windows machine with the same files and had no problem.</p>
  
  <p>After some digging, I found this line seems to be the main culprit:</p>
  
  <pre><code>app.use(express.static(__dirname, '/'));
  </code></pre>
  
  <p>Can someone tell me what might be happening?</p>