title: TypeError: Is not a constructor, exporting a class object from another file
body: <p>I have searching for a solution for this error and nothing works so far. I want to export a class from another file so that it can still be used by the main file.</p>
  <p>This is the error I get when I run the program.</p>
  <blockquote>
  <pre><code>E:\VSC\block.js:5
  let block1 = new Blockchain();
                   ^ 
  TypeError: Blockchain is not a constructor
  </code></pre>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/tOOKU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tOOKU.png" alt="enter image description here" /></a></p>
  <p>Here is my code.</p>
  <pre class="lang-js prettyprint-override"><code>const Blockchain = require('./blockchain.js');
  
  const Transaction = require('./blockchain.js');
  
  let block1 = new Blockchain();
  </code></pre>
  <p>I suspect this is some sort of syntax error but I cant see anything wrong with the code.</p>
  <p>Thanks.</p>