title: XMLHttpRequest is not defined - Papa parse
body: <p>EDIT: [SOLVED] For anyone who reads this, Papa Parse is a parser for the browser, not Node.js. Baby Parse is used for Node.js, but know that it isn't as extensive in its functionality and can't parse straight from a file, only from a string.</p>
  
  <p>In the <code>papaparse.js</code> file, it has this line of code:</p>
  
  <pre><code>xhr = new XMLHttpRequest();
  </code></pre>
  
  <p>This seems to be causing the error and I'm not sure how to get around it.</p>
  
  <p>My code:</p>
  
  <pre><code>var Papa = require('papaparse');
  var data;
  
  process.argv.forEach(function(val, index, array) {
      console.log(index + ': ' + val);
  });
  var file = process.argv[2];
  console.log("File: " + file);
  
  
  // Parse the file
  Papa.parse(file, {
      header: true,
      download: true,
      dynamicTyping: true,
      complete: function(results) {
          data = results;
          console.log(data);
      }
  });
  </code></pre>
  
  <p>Any ideas would be appreciated :)</p>