<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Node Version:</strong><br>
v12.16.1</li>
<li><strong>Electron Version:</strong><br>
v11.0.0-beta.13</li>
<li><strong>Electron-builder Version:</strong><br>
v22.9.1</li>
<li><strong>Operating System:</strong><br>
macOS 10.15.2</li>
<li><strong>Last Known Working Electron version:</strong><br>
v10.1.4</li>
</ul>
<p dir="auto">Hello,</p>
<p dir="auto">I am not sure this is the right place to post this or if I should create this on electron-builder, but considering the behavior changed between version 10.x and 11 of electron it might be relevant. Please tell me if I should open it elsewhere instead. We are having an issue when building our application with version 11-beta using electron-builder. We rely on static binaries to be included in our build (ffmpeg, to name it), but when starting the built app we get a JS error saying the package.json file for this module is invalid (Unexpected end of JSON input).</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The production application should run similarly to the dev</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Production build crashes on start</p>
<p dir="auto">When looking at the content of the generated .app the (unpacked) app.asar has properly included the dependencies, and the package.json is valid.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">The project runs fine on dev, it's the finalized built version that has an issue. I created a repo with the base project, as well as uploaded the built version in the 1.0.0 release of this repo.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/lmancel/electron-tests.git
$ yarn install
$ yarn build"><pre class="notranslate">$ git clone https://github.com/lmancel/electron-tests.git
$ yarn install
$ yarn build</pre></div>
<p dir="auto">Built binary:<br>
<a href="https://github.com/lmancel/electron-tests/releases/download/1.0.0/electron-test-1.0.0-mac.zip">https://github.com/lmancel/electron-tests/releases/download/1.0.0/electron-test-1.0.0-mac.zip</a></p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5877409/96736606-0e06b780-13bd-11eb-8a0a-e430d0a38fd3.png"><img src="https://user-images.githubusercontent.com/5877409/96736606-0e06b780-13bd-11eb-8a0a-e430d0a38fd3.png" alt="Screenshot 2020-10-21 at 16 41 49" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5877409/96737270-c59bc980-13bd-11eb-9e32-94b413942660.png"><img src="https://user-images.githubusercontent.com/5877409/96737270-c59bc980-13bd-11eb-9e32-94b413942660.png" alt="Screenshot 2020-10-21 at 16 50 46" style="max-width: 100%;"></a></p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
11.0.0-beta.1</li>
<li><strong>Operating System:</strong><br>
macOS 10.15.6</li>
<li><strong>Last Known Working Electron version:</strong><br>
11.0.0-beta.1</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">No Error</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Uncaught Exception:<br>
SyntaxError: Error parsing /Applications/electron11.app/Contents/Resources/app.asar/node_modules/ffmpeg-static/package.json: Unexpected end of JSON input</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">packages:<br>
"electron-builder": "^22.8.0",<br>
"ffmpeg-static": "^4.2.0",</p>
<p dir="auto">in main.js ：<br>
var pathToFfmpeg = require('ffmpeg-static');<br>
console.log('pathToFfmpeg ',pathToFfmpeg);</p>
<p dir="auto">npm run build</p>
<p dir="auto">install dmg  and open the app</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7902399/92990924-a4200600-f512-11ea-8329-d126c5a31fb4.png"><img src="https://user-images.githubusercontent.com/7902399/92990924-a4200600-f512-11ea-8329-d126c5a31fb4.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Additional Information</h3>