title: Packaging Electron + Puppeteer to a .exe
body: <p>Hi I have an Electron app that's running <code>Puppeteer</code> (To be specific it is <code>puppeteer-cluster</code>). I want to be able to package this app into a .exe that I can distribute with.</p>
  <p>One requirement though is that I have to be able to pack it with <code>--asar</code>.</p>
  <p><em><strong>Here's some stuff I tried but failed:</strong></em></p>
  <p>I tried setting the executable path :</p>
  <pre><code>let ChromiumPath = path.join(__dirname, &quot;..&quot;, &quot;..&quot;, &quot;..&quot;,&quot;.local-chromium&quot;, &quot;win64-809590&quot;, &quot;chrome-win&quot;,&quot;chrome.exe&quot;);
  
  const cluster = await Cluster.launch({
            puppeteer,
            concurrency: Cluster.CONCURRENCY_BROWSER,
            maxConcurrency: arg.length,
            timeout: 340000,
            puppeteerOptions: {
              args: browserArgs,
              headless: false,
              ignoreHTTPSErrors: true,
              executablePath : ChromiumPath
            },
            perBrowserOptions: perBrowserOptions,
        });
  </code></pre>
  <p>I tried specifying the unpack directory in <code>package.json</code></p>
  <pre><code>&quot;config&quot;: {
      &quot;forge&quot;: {
        &quot;packagerConfig&quot;: {
          &quot;asar&quot;: {
            &quot;unpack&quot;: &quot;**/node_modules/puppeteer/.local-chromium/**/*&quot;
          }
        }.....
  </code></pre>
  <p>Here's how i package my app:</p>
  <p><code>electron-packager . --asar</code></p>
  <p>And if needed, here's my <code>package.json</code>:</p>
  <pre><code>{
    &quot;name&quot;: &quot;testBrowsers&quot;,
    &quot;productName&quot;: &quot;testBrowsers&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;IDk&quot;,
    &quot;main&quot;: &quot;src/index.js&quot;,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;electron-forge start&quot;,
      &quot;package&quot;: &quot;electron-packager ./ testBrowsers --platform=win32  --arch=x64 --icon=./tool.ico --out=./dist --electron-version=10.1.4 --overwrite&quot;,
      &quot;make&quot;: &quot;electron-forge make&quot;,
      &quot;publish&quot;: &quot;electron-forge publish&quot;,
      &quot;lint&quot;: &quot;echo \&quot;No linting configured\&quot;&quot;
    },
    &quot;keywords&quot;: [],
    &quot;author&quot;: &quot;Otter&quot;,
    &quot;license&quot;: &quot;MIT&quot;,
    &quot;config&quot;: {
      &quot;forge&quot;: {
        &quot;packagerConfig&quot;: {
          &quot;asar&quot;: {
            &quot;unpack&quot;: &quot;**/node_modules/puppeteer/.local-chromium/**/*&quot;
          }
        },
        &quot;makers&quot;: [
          {
            &quot;name&quot;: &quot;@electron-forge/maker-squirrel&quot;,
            &quot;config&quot;: {
              &quot;name&quot;: &quot;testBrowsers&quot;
            }
          },
          {
            &quot;name&quot;: &quot;@electron-forge/maker-zip&quot;,
            &quot;platforms&quot;: [
              &quot;darwin&quot;
            ]
          },
          {
            &quot;name&quot;: &quot;@electron-forge/maker-deb&quot;,
            &quot;config&quot;: {}
          },
          {
            &quot;name&quot;: &quot;@electron-forge/maker-rpm&quot;,
            &quot;config&quot;: {}
          }
        ]
      }
    },
    &quot;dependencies&quot;: {
      &quot;electron-squirrel-startup&quot;: &quot;^1.0.0&quot;,
      &quot;proxy-chain&quot;: &quot;^0.4.5&quot;,
      &quot;puppeteer&quot;: &quot;^5.4.1&quot;,
      &quot;puppeteer-cluster&quot;: &quot;^0.22.0&quot;,
      &quot;puppeteer-extra&quot;: &quot;^3.1.15&quot;,
      &quot;puppeteer-extra-plugin-stealth&quot;: &quot;^2.6.5&quot;,
      &quot;puppeteer-page-proxy&quot;: &quot;^1.2.8&quot;,
      &quot;taskkill&quot;: &quot;^3.1.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@electron-forge/cli&quot;: &quot;^6.0.0-beta.54&quot;,
      &quot;@electron-forge/maker-deb&quot;: &quot;^6.0.0-beta.54&quot;,
      &quot;@electron-forge/maker-rpm&quot;: &quot;^6.0.0-beta.54&quot;,
      &quot;@electron-forge/maker-squirrel&quot;: &quot;^6.0.0-beta.54&quot;,
      &quot;@electron-forge/maker-zip&quot;: &quot;^6.0.0-beta.54&quot;,
      &quot;electron&quot;: &quot;10.1.4&quot;
    }
  }
  </code></pre>
  <p>Thanks I really hope someone can help me out with this issue! :)</p>