title: TypeError: require is not a function
body: <p>I am using Angular2 in electron app. I wanted to use the remote module of electron as described here.</p>
  
  <p><a href="https://github.com/electron/electron/blob/master/docs/api/remote.md#remote" rel="nofollow noreferrer">https://github.com/electron/electron/blob/master/docs/api/remote.md#remote</a></p>
  
  <p>When I write the following line in my typescript file, it throws an weird error</p>
  
  <pre><code>const {clipboard} = require('electron')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/eGoDK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eGoDK.png" alt="enter image description here"></a></p>
  
  <p>I know there are a lot of reference comes if I type that error in Google, but nothing helps. I tried all without any success.</p>
  
  <p><strong>UPDATE:</strong> </p>
  
  <p>I have fixed the issue, simply updated the version of the systemJS to 0.19.41 and it worked. Previously it was 0.19.25. It will be great if anybody can explain why it was not working with the older version. I will accept the answer.</p>