title: electron-packager not installing all modules from node_modules
body: <p><code>electron-packager .</code> not installing all modules from <code>node_modules</code> on Darwin platform.</p>
  
  <p>When trying to start such packaged app, following error occurs:</p>
  
  <pre><code>Uncaught Exception:
  Error: Cannot find module 'sudo-prompt'
      at Module._resolveFilename (module.js:470:15)
      at Function.Module._resolveFilename
  </code></pre>
  
  <p>Both <code>package.json</code> and <code>node_modules</code> are in current folder.</p>
  
  <p>I’ve tried to remove <code>node_modules</code> completely and refresh them with <code>npm install -production</code> but it didn't help to package the app correctly. </p>
  
  <blockquote>
    <p>package.json</p>
  </blockquote>
  
  <pre><code>"main": "app.js",
    "scripts": {
      "start": "electron ."
    },
    "devDependencies": {
      "chokidar": "^1.7.0",
      "electron": "^1.6.11",
      "filesize": "^3.5.6",
      "jquery": "^3.2.1",
      "keymaster": "^1.6.2",
      "open": "0.0.5",
      "peity": "^3.2.1",
      "sudo-prompt": "^7.1.0",
      "underscore": "^1.8.3",
      "unzip-stream": "^0.1.2"
    },
    "dependencies": {
      "chart.js": "^2.6.0",
      "filesize": "^3.5.10",
      "open": "0.0.5",
      "sudo-prompt": "^7.1.0"
    }
  </code></pre>
  
  <p>Packaged app with <code>electron-packager</code> has  only <code>chart.js</code>  All other dependencies are missing.</p>
  
  <pre><code>.app/Contents/Resources/app $ npm ls
  └─┬ chart.js@2.6.0
    ├─┬ chartjs-color@2.1.0
    │ ├─┬ chartjs-color-string@0.4.0
    │ │ └── color-name@1.1.2
    │ └── color-convert@0.5.3
    └── moment@2.18.1
  </code></pre>