title: Error when building my electron app
body: <p>I'm stuck with a problem when building my Node JS/electron app with <strong>electron-builder</strong>. It works perfectly when running <code>npm start</code>. But, when I execute the command <code>build -w</code> (for windows) it fails with <a href="https://crerensak.com/ARENA/loggy" rel="nofollow noreferrer">this log</a>.</p>
  
  <p>Here is my JSON file:</p>
  
  <pre><code>{
    "name": "Munshiiii",
    "version": "1.0.0",
    "description": "This is a short Description of the project",
    "main": "index.js",
    "scripts": {
      "start": "electron .",
      "dist": "build -w"
    },
    "author": "Hicham Dbiza",
    "license": "ISC",
    "devDependencies": {
      "electron": "1.7.8",
      "electron-prebuilt": "^1.4.13"
    },
    "dependencies": {
      "asar": "^0.13.0",
      "cradle": "^0.7.1",
      "fs": "0.0.1-security",
      "git": "^0.1.5",
      "jquery": "^3.2.1",
      "jsdom": "^11.3.0",
      "loke-ipc": "^1.0.5",
      "mongodb": "^2.2.33",
      "node-couchdb": "^1.2.0",
      "pouchdb": "^6.3.4",
      "pouchdb-replication-stream": "^1.2.9",
      "scanner.js": "^1.0.0"
    },
    "build":{
      "appId": "com.hicham.dbiza.faizan",
      "win":{
          "target": "nsis",
          "icon": "build/Munshiiii.ico"
      }
    }
  }
  </code></pre>
  
  <p>for this project Im using:</p>
  
  <ul>
  <li>fs</li>
  <li>pouchdb</li>
  <li>electron</li>
  <li>jquery</li>
  <li>....</li>
  </ul>
  
  <p>I already used electron-packager and it works almost fine with one problem: <a href="https://i.stack.imgur.com/3J9h8.jpg" rel="nofollow noreferrer">See this picture</a>, which means all links inside the js files (e.g:  fs.readFileSync('./assets/state','utf8')) won't work.
  I have also added some native js click and keypress listeners... could that be a problem?</p>
  
  <p>My electron version is 1.7.8.</p>
  
  <p>I appreciate your help.</p>