title: Unable to find electron app
body: <p>I'm running through this <a href="https://www.youtube.com/watch?v=u_vMChpZMCk&amp;t=6s" rel="nofollow noreferrer">youtube tutorial</a> on an Ubuntu 17.10 and when I run the build command <code>ng build --prod &amp;&amp; electron .</code> the result is:</p>
  
  <p>Error launching app
  Unable to find Electron app at /home/ole/angular-electron</p>
  
  <p>Cannot find module '/home/ole/angular-electron'</p>
  
  <p>The app compiles fine, just the <code>electron .</code> step that is failing.  The <code>package.json</code> contents including the <code>main</code> attribute look like this:</p>
  
  <pre><code>  "name": "angular-electron",
    "version": "0.0.0",
    "license": "MIT",
    "main": "main.js",
  </code></pre>
  
  <p>I also tried running running the command as indicated in the first answer and this is the result:</p>
  
  <pre><code>    ole@mki:~/angular-electron$ ng build --prod &amp;&amp; npm run electron
      Date: 2018-02-03T02:57:31.154Z
      Hash: a2a64f9c18abdabf8e6e
      Time: 25113ms
      chunk {0} polyfills.f20484b2fa4642e0dca8.bundle.js (polyfills) 59.4 kB [initial] [rendered]
      chunk {1} main.34c2037568943aee5abc.bundle.js (main) 152 kB [initial] [rendered]
      chunk {2} styles.9c0ad738f18adc3d19ed.bundle.css (styles) 79 bytes [initial] [rendered]
      chunk {3} inline.ef66fc99c35b976a47ae.bundle.js (inline) 1.45 kB [entry] [rendered]
  
      &gt; angular-electron@0.0.0 electron /home/ole/Junk/angular-electron
      &gt; electron .
  
      Error launching app
      Unable to find Electron app at /home/ole/Junk/angular-electron
  
      Cannot find module '/home/ole/Junk/angular-electron'
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! angular-electron@0.0.0 electron: `electron .`
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the angular-electron@0.0.0 electron script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/ole/.npm/_logs/2018-02-03T02_57_32_025Z-debug.log
      ole@mki:~/Junk/angular-electron$ ng build --prod &amp;&amp; npm run electron
      Date: 2018-02-03T02:59:37.741Z
      Hash: a2a64f9c18abdabf8e6e
      Time: 25083ms
      chunk {0} polyfills.f20484b2fa4642e0dca8.bundle.js (polyfills) 59.4 kB [initial] [rendered]
      chunk {1} main.34c2037568943aee5abc.bundle.js (main) 152 kB [initial] [rendered]
      chunk {2} styles.9c0ad738f18adc3d19ed.bundle.css (styles) 79 bytes [initial] [rendered]
      chunk {3} inline.ef66fc99c35b976a47ae.bundle.js (inline) 1.45 kB [entry] [rendered]
  
      &gt; angular-electron@0.0.0 electron /home/ole/Junk/angular-electron
      &gt; electron .
  
      Error launching app
      Unable to find Electron app at /home/ole/Junk/angular-electron
  
      Cannot find module '/home/ole/Junk/angular-electron'
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! angular-electron@0.0.0 electron: `electron .`
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the angular-electron@0.0.0 electron script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/ole/.npm/_logs/2018-02-03T02_59_38_568Z-debug.log
      ole@mki:~/Junk/angular-electron$ ng build --prod &amp;&amp; npm run electron .
      Date: 2018-02-03T03:01:35.087Z
      Hash: a2a64f9c18abdabf8e6e
      Time: 25017ms
      chunk {0} polyfills.f20484b2fa4642e0dca8.bundle.js (polyfills) 59.4 kB [initial] [rendered]
      chunk {1} main.34c2037568943aee5abc.bundle.js (main) 152 kB [initial] [rendered]
      chunk {2} styles.9c0ad738f18adc3d19ed.bundle.css (styles) 79 bytes [initial] [rendered]
      chunk {3} inline.ef66fc99c35b976a47ae.bundle.js (inline) 1.45 kB [entry] [rendered]
  
      &gt; angular-electron@0.0.0 electron /home/ole/Junk/angular-electron
      &gt; electron . "."
  
      Error launching app
      Unable to find Electron app at /home/ole/Junk/angular-electron
  
      Cannot find module '/home/ole/Junk/angular-electron'
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! angular-electron@0.0.0 electron: `electron . "."`
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the angular-electron@0.0.0 electron script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/ole/.npm/_logs/2018-02-03T03_01_35_948Z-debug.log
  </code></pre>
  
  <p>Also tried running the electron command separately with <code>electron .</code>.  The result is the same.  It complains that it can't find <code>electron</code>.  Also tried running it from the <code>node_modules</code> directory like this:</p>
  
  <p>ole@mki:~/angular-electron$ ./node_modules/electron/dist/electron .
  Error launching app
  Unable to find Electron app at /home/ole/angular-electron</p>
  
  <p>Cannot find module '/home/ole/angular-electron'</p>
  
  <p>Thoughts?</p>