title: nodejs fs.exists()
body: <p>I'm trying to call <code>fs.exists</code> in a node script but I get the error:</p>
  
  <blockquote>
    <p>TypeError: Object # has no method 'exists'</p>
  </blockquote>
  
  <p>I've tried replacing <code>fs.exists()</code> with <code>require('fs').exists</code> and even <code>require('path').exists</code> (just in case), but neither of these even list the method <code>exists()</code> with my IDE. <code>fs</code> is declared at the top of my script as <code>fs = require('fs');</code> and I've used it previously to read files.</p>
  
  <p>How can I call <code>exists()</code>?</p>