title: SPAWN node ENOENT error in electron package on run
body: <p>I have build an <strong>node.js, express.js app, electron</strong> app and in operating system <strong>Windows</strong>. I have packaged the electron app through the tutorial: <a href="https://medium.com/@meakaakka/a-complete-guide-to-packaging-your-electron-app-1bdc717d739f" rel="nofollow noreferrer">How to package an electron app</a></p>
  
  <p>The packaging to win32 is successful without any warning or errors.<br>
  However when I try to run the app.exe file from the dist folder, though the main application window shows up but I cannot see any content that I have in my express.js app folder.<br>
  My app folder structure is:<br></p>
  
  <pre><code>app-root&lt;br&gt;
    - express-app
      - bin
        - www
      - node_modules
      - public
      - routes
      - views
      - app.js
      - package.json
    - node_modules
    - build
    - index.html
    - main.js
    - package.json
    - start-electron.js
    - dist&lt;br&gt;
  </code></pre>
  
  <p><strong>Now</strong> The node.js, express.js app in electron runs smoothly normally before packaging. The app does not run from the exe file after packaging.<br><br></p>
  
  <p>This is the error in console for the package .exe file:<br></p>
  
  <pre><code>events.js:163 Uncaught Error: spawn node ENOENT
  at exports._errnoException (util.js:1050:11)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
  at onErrorNT (internal/child_process.js:367:16)
  at _combinedTickCallback (internal/process/next_tick.js:80:11)
  at process._tickCallback (internal/process/next_tick.js:104:9)
  </code></pre>
  
  <p>I have the SPAWN function in the index.html as:<br></p>
  
  <pre><code>  spawn = require("child_process").spawn,
    app = require('electron').remote.app,
    node = spawn("node", ["./express-app/bin/www"], {
      cwd: app.getAppPath()
    })
  </code></pre>
  
  <p>Any kind of help will be appreciated.</p>