title: File System Nodejs: "Uncaught TypeError: fs.writeFileSync is not a function"
body: <p>I am not able to use the File System module of Nodejs. I have gone through many forums - applied the suggested fixes - and I'm still not able to use fs.</p>
  
  <p>My config.js file includes this as is suggested by <a href="https://github.com/request/request/issues/1529" rel="nofollow">https://github.com/request/request/issues/1529</a> :</p>
  
  <pre><code>node: {
              console: true,
              fs: 'empty',
              net: 'empty',
              tls: 'empty'
  },
  </code></pre>
  
  <p>This is my main file:</p>
  
  <pre><code>...
  
  var fs = require('fs');
  
  ...
  onGo(e){
  
      e.preventDefault();
  
  
      var json = {
          foo: 'bar',
          qux: 'moo',
          poo: 123
      }
  
      var xls = json2xls(json);
  
      //everything runs smoothly right until here
  
      fs.writeFileSync('data.xlsx', xls);  //fs is where trouble ensues
  
   }
  </code></pre>
  
  <p>I have tried using fs.write/fs.writeFile/etc but 'fs' is always generating a typeerror.</p>
  
  <p>Please help me. Thanks.</p>