title: Error when using electron `app.getPath('home');`
body: <p>I have the following code within a script I am using within my electron app:</p>
  
  <pre><code>window.$ = window.jQuery = require('jquery');
  const {
     app
  } = require('electron');
  $(document).ready(function() {
     let home = app.getPath('home');
     let homePathTemplate = document.getElementById('home');
      homePathTemplate.innerHTML(home);
  });
  </code></pre>
  
  <p>Which looks as though it should work however receive the following error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'getPath' of undefined
  </code></pre>
  
  <p>Any ideas for a quick fix?</p>
  
  <blockquote>
    <p>Edit 1</p>
  </blockquote>
  
  <p>With the following</p>
  
  <pre><code>const app = require('electron');
  </code></pre>
  
  <p>And the same function as above I receive the following error:</p>
  
  <pre><code>Uncaught TypeError: app.getPath is not a function at HTMLDocument.
  </code></pre>