title: Electron & Angular: fs.existsSync is not a function
body: <p>I've created a new Electron-Project with Angular. I build my app with the Angular CLI. 
  Now, I want to communicate from Renderer-Process to Main-Process and get an error in Dev-Tools:</p>
  
  <pre><code>&gt; Uncaught TypeError: fs.existsSync is not a function
      at Object.&lt;anonymous&gt; (vendor.bundle.js:72643)
      at Object.splitPathRe (vendor.bundle.js:72649)
      at __webpack_require__ (inline.bundle.js:53)
      at Object.399 (main.bundle.js:54)
      at __webpack_require__ (inline.bundle.js:53)
      at Object.400 (main.bundle.js:107)
      at __webpack_require__ (inline.bundle.js:53)
      at Object.291 (main.bundle.js:24)
      at __webpack_require__ (inline.bundle.js:53)
      at Object.473 (main.bundle.js:234)
      at __webpack_require__ (inline.bundle.js:53)
      at webpackJsonpCallback (inline.bundle.js:24)
      at main.bundle.js:1
  </code></pre>
  
  <p>I use this Project-Template: <a href="https://github.com/auth0-blog/angular2-electron" rel="nofollow noreferrer">https://github.com/auth0-blog/angular2-electron</a>
  The steps to reproduce this error are:</p>
  
  <pre><code>git clone https://github.com/auth0-blog/angular2-electron
  npm install
  </code></pre>
  
  <p>3.Add following line to src/app/app.component.ts</p>
  
  <pre><code>const {ipcRenderer} = require('electron');
  </code></pre>
  
  <p>Without that line, the app runs without any problems. 
  Due to electron I have to reference the ipcRenderer that way... <a href="https://github.com/electron/electron/blob/master/docs/api/ipc-main.md" rel="nofollow noreferrer">https://github.com/electron/electron/blob/master/docs/api/ipc-main.md</a></p>
  
  <p>I have no idea what I am doing wrong and hope, you can help me.</p>