title: Error: Uncaught ReferenceError: module is not defined when using module.export
body: <p><strong>Complete error:</strong> Uncaught ReferenceError: module is not defined at vsop87Bearth.js:1</p>
  
  <p>I`m trying to use some js files that I found from this(<a href="https://github.com/commenthol/astronomia" rel="nofollow noreferrer">https://github.com/commenthol/astronomia</a>) repository to calculate the rectangular coordinates of the sun. I'm new to js and servers so im not sure on how to use module.exports.
  There is a file called <em>vsop87Bearth.js</em> with some coordinates that modelates the earth and it looks like this:</p>
  
  <pre><code>module.exports = {
    stuff: numbers,
    name: "earth"
  };
  </code></pre>
  
  <p>And I need to use the <em>vsop87Bearth.js</em> file with a function called <em>position()</em> to do what I need. This is the module <em>Funcion_PSol.js</em> where Im trying to calculate things:</p>
  
  <pre><code>import position from './astronomia-master/src/solarxyz.js'
  import Planet from './astronomia-master/src/planetposition.js'
  import * as earth from './astronomia-master/data/vsop87Bearth.js' //I'm not sure of THIS line
  var tierra = new Planet(earth);
  var pos = position(earth, 2448908.5)
  </code></pre>
  
  <p>Also, the error might be caused from the HTML file, this is it:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="module" src="./astronomia-master/data/vsop87Bearth.js"&gt;&lt;/script&gt;
      &lt;script type="module" src="Funcion_PSol.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Note: I´m using browsersync to host my project and Im  not using Node</p>