title: Unable to import csv file into static file using node and expres
body: <p>I'm pretty new to node and express, and am trying to integrate some d3 visualizations into my web page. Basically, I have a js file that generates all the d3 stuff, which I then include in my .ejs file.</p>
  <p>I'm trying to follow a past project I did with d3, and am trying to import my csv file into my d3 js file. However, I get the error</p>
  <p>&quot;Failed to load module script: The server responded with a non-JavaScript MIME type of &quot;text/csv&quot;.</p>
  <p>This is my setup:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// user-influence-viz.js
  
  // this line gives error, worked in a past project that didn't use express
  import influence_csv from "./influenceByMonth.csv"
  
  const SVG_WIDTH = 600;
  const SVG_HEIGHT = 600;
  
  // rest of code below, irrelevant so leaving out to reduce clutter</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;Stats&lt;/title&gt;
    &lt;link rel="stylesheet" href="/css/style.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;h1&gt;Stats&lt;/h1&gt;
    &lt;div class="display-container"&gt;
      &lt;div class="tab-content" id="tab1Content"&gt;
        &lt;!-- Data viz goes in here, placed here by d3 code --&gt;
      &lt;/div&gt;
      &lt;div class="tab-content"&gt;Tab 2 Content&lt;/div&gt;
      &lt;div class="tab-content"&gt;Tab 3 Content&lt;/div&gt;
      &lt;div class="tab-content"&gt;Tab 4 Content&lt;/div&gt;
    &lt;/div&gt;
    
    &lt;script src="https://d3js.org/d3.v5.min.js"&gt;&lt;/script&gt;
    &lt;script type="module" src="user-influence-viz.js" defer&gt;&lt;/script&gt;
    &lt;script src="javascripts/bundle.js" defer&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>If this is not the proper way, what is the correct way to go about this? Looked up a bunch of other resources but nothing with this issue, so I may be lacking some basic knowledge. Thanks!</p>