title: Uncaught TypeError: fs_1.default.readFileSync is not a function
body: <p>I am utilizing Parcel bundler in a project, but one of my biggest roadblocks is that I am making use of the <code>fs</code> module from the Node Standard Library and I get this error as a result:</p>
  <p><code>fs_1.default.readFileSync is not a function</code></p>
  <p>The above error is based on this logic:</p>
  <pre class="lang-js prettyprint-override"><code>import fs from 'fs';
  
  class Data {
    Address: string;
    General_Plan_Designation: string;
    Latitude: number;
    Longitude: number;
  
    static DELIMITER = &quot;,&quot;;
  
    constructor(rawRow) {
      const data = rawRow.split(Data.DELIMITER);
  
      this.Address = data[0];
      this.General_Plan_Designation = data[1];
      this.Latitude = parseFloat(data[2]);
      this.Longitude = parseFloat(data[3]);
    }
  }
  
  const ROW_DELIMITER = &quot;\r\n&quot;;
  
  const rawData = fs.readFileSync(&quot;Cales_trim_down.csv&quot;, {
    encoding: &quot;utf-8&quot;,
  });
  
  const data: Data[] = [];
  
  for (const rawRow of rawData.split(ROW_DELIMITER)) {
    data.push(new Data(rawRow));
  }
  
  console.log(data);
  </code></pre>
  <p>I was told to do <code>import * as whateverFS from 'fs';</code> but that did not resolve the issue. I was told to go into the <code>tsconfig.json</code> file and ensure esModule something or other is set to <code>true</code> but Parcel does not have one, not one I can reconfigure at least.</p>
  <p>How do I get Node Standard Library modules to work with Parcel?</p>