title: Javascript ES6 TypeError: Class constructor Client cannot be invoked without 'new'
body: <p>I have a class written in Javascript ES6. When I try to execute <code>nodemon</code> command I always see this error <code>TypeError: Class constructor Client cannot be invoked without 'new'</code></p>
  
  <p>The full error is mentioned below:</p>
  
  <pre><code>/Users/akshaysood/Blockchain/fabricSDK/dist/application/Transaction.js:45
          return (0, _possibleConstructorReturn3.default)(this, (FBClient.__proto__ || (0, _getPrototypeOf2.default)(FBClient)).call(this, props));
                                                                                                                                ^
  
  TypeError: Class constructor Client cannot be invoked without 'new'
      at new FBClient (/Users/akshaysood/Blockchain/fabricSDK/dist/application/Transaction.js:45:127)
      at Object.&lt;anonymous&gt; (/Users/akshaysood/Blockchain/fabricSDK/dist/application/Transaction.js:195:14)
      at Module._compile (module.js:641:30)
      at Object.Module._extensions..js (module.js:652:10)
      at Module.load (module.js:560:32)
      at tryModuleLoad (module.js:503:12)
      at Function.Module._load (module.js:495:3)
      at Module.require (module.js:585:17)
      at require (internal/module.js:11:18)
      at Object.&lt;anonymous&gt; (/Users/akshaysood/Blockchain/fabricSDK/dist/routes/users.js:11:20)
  </code></pre>
  
  <p>What I am trying to do is, I have created a class and then created an instance of that class. Then I am trying to export that variable.</p>
  
  <p>The class structure is defined below:</p>
  
  <pre><code>class FBClient extends FabricClient{
  
      constructor(props){
          super(props);
      }
  
  &lt;&lt;&lt; FUNCTIONS &gt;&gt;&gt;
  
  }
  </code></pre>
  
  <p>How I am trying to export the variable -></p>
  
  <pre><code>var client = new FBClient();
  client.loadFromConfig(config);
  
  export default client = client;
  </code></pre>
  
  <p>You can find the full code here > <a href="https://hastebin.com/kecacenita.js" rel="noreferrer">https://hastebin.com/kecacenita.js</a>
  Code generated by Babel > <a href="https://hastebin.com/fabewecumo.js" rel="noreferrer">https://hastebin.com/fabewecumo.js</a></p>