title: Can't publish the electron app from github
body: <p>I just created my electron-react application and also I implemented the auto-update functionality. But unexpectedly I got some weird error logs from electron-builder.</p>
  <p>I'm not sure how to resolve it. I tried different kinds of ways. I hope this community helps me. Thanks in advance.</p>
  <p>This configuration works fine for developing local build and also after installed it's works fine as per expected. The problem only raises the <code>npm run package-deploy</code> command.</p>
  <p>Am I doing anything wrong?</p>
  <p><strong>package.json</strong></p>
  <pre><code>{
    &quot;name&quot;: &quot;analyzer&quot;,
    &quot;version&quot;: &quot;1.2.1&quot;,
    &quot;private&quot;: true,
    &quot;homepage&quot;: &quot;./&quot;,
    &quot;author&quot;: &quot;Mohamed Jakkariya&quot;,
    &quot;description&quot;: &quot;This application used for analyzing the stock information and find useful data for trading in the better way.&quot;,
    &quot;dependencies&quot;: {
      &quot;@material-ui/core&quot;: &quot;^4.11.4&quot;,
      &quot;@material-ui/icons&quot;: &quot;^4.11.2&quot;,
      &quot;@material-ui/lab&quot;: &quot;*&quot;,
      &quot;@reduxjs/toolkit&quot;: &quot;^1.5.1&quot;,
      &quot;csv-parser&quot;: &quot;^3.0.0&quot;,
      &quot;electron-is-dev&quot;: &quot;^2.0.0&quot;,
      &quot;electron-updater&quot;: &quot;^4.3.9&quot;,
      &quot;moment&quot;: &quot;^2.29.1&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;react-redux&quot;: &quot;^7.2.4&quot;,
      &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
      &quot;react-scripts&quot;: &quot;4.0.3&quot;,
      &quot;styled-components&quot;: &quot;^5.3.0&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;set BROWSER=none &amp;&amp; react-scripts start&quot;,
      &quot;electron&quot;: &quot;electron .&quot;,
      &quot;start-electron&quot;: &quot;set ELECTRON_START_URL=http://localhost:3000 &amp;&amp; electron .&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;build-electron&quot;: &quot;robocopy src/electron build/electron /S &quot;,
      &quot;lint&quot;: &quot;eslint src/**/*.js src/**/*.jsx&quot;,
      &quot;package-build&quot;: &quot;electron-builder build --win -c.extraMetadata.main=build/electron.js --publish never&quot;,
      &quot;package-deploy&quot;: &quot;electron-builder build --win -c.extraMetadata.main=build/electron.js --publish always&quot;
    },
    &quot;main&quot;: &quot;public/electron.js&quot;,
    &quot;publish&quot;: {
      &quot;provider&quot;: &quot;github&quot;,
      &quot;repo&quot;: &quot;nift-analyzer&quot;,
      &quot;owner&quot;: &quot;MohamedJakkariya&quot;,
      &quot;releaseType&quot;: &quot;release&quot;
    },
    &quot;repository&quot;: {
      &quot;type&quot;: &quot;git&quot;,
      &quot;url&quot;: &quot;https://github.com/MohamedJakkariya/nift-analyzer/&quot;
    },
    &quot;build&quot;: {
      &quot;productName&quot;: &quot;Stock Analyzer&quot;,
      &quot;appId&quot;: &quot;com.mohamedjakkariya.nift-analyzer&quot;,
      &quot;files&quot;: [
        &quot;build/**/*&quot;,
        &quot;node_modules/**/*&quot;
      ],
      &quot;win&quot;: {
        &quot;icon&quot;: &quot;./public/icon.png&quot;,
        &quot;publish&quot;: [
          &quot;github&quot;
        ]
      },
      &quot;directories&quot;: {
        &quot;buildResources&quot;: &quot;assets&quot;
      }
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;devDependencies&quot;: {
      &quot;electron&quot;: &quot;^12.0.8&quot;,
      &quot;electron-builder&quot;: &quot;^22.11.1&quot;,
      &quot;electron-devtools-installer&quot;: &quot;^3.2.0&quot;,
      &quot;eslint-plugin-react&quot;: &quot;^7.23.2&quot;
    }
  }
  </code></pre>
  <p><strong>Error Logs</strong></p>
  <pre><code>&gt; analyzer@1.2.1 package-deploy
  &gt; electron-builder build --win -c.extraMetadata.main=build/electron.js --publish always
  
    • electron-builder  version=22.10.5 os=10.0.18362
    • cannot check updates  error=TypeError: update_notifier_1.default is not a function
    • loaded configuration  file=package.json (&quot;build&quot; field)
    • loaded parent configuration  preset=react-cra
    • writing effective config  file=dist\builder-effective-config.yaml
    • packaging       platform=win32 arch=x64 electron=12.0.8 appOutDir=dist\win-unpacked
    • building        target=nsis file=dist\Stock Analyzer Setup 1.2.1.exe archs=x64 oneClick=true perMachine=false
    • building block map  blockMapFile=dist\Stock Analyzer Setup 1.2.1.exe.blockmap
    • publishing      publisher=Github (owner: MohamedJakkariya, project: nift-analyzer, version: 1.2.1)
    • uploading       file=Stock-Analyzer-Setup-1.2.1.exe.blockmap provider=GitHub
    • uploading       file=Stock-Analyzer-Setup-1.2.1.exe provider=GitHub
    ⨯ Cannot cleanup: 
  
  Error #1 --------------------------------------------------------------------------------
  TypeError: Cannot read property 'getType' of undefined
      at GitHubPublisher.doUploadFile (C:\Users\MD\Desktop\stock-calc\node_modules\electron-publish\src\gitHubPublisher.ts:190:36)
      at GitHubPublisher.doUpload (C:\Users\MD\Desktop\stock-calc\node_modules\electron-publish\src\gitHubPublisher.ts:170:23)
      at processTicksAndRejections (node:internal/process/task_queues:94:5)
      at GitHubPublisher.upload (C:\Users\MD\Desktop\stock-calc\node_modules\electron-publish\src\publisher.ts:87:5)
      at async Promise.all (index 2)
      at AsyncTaskManager.awaitTasks (C:\Users\MD\Desktop\stock-calc\node_modules\builder-util\src\asyncTaskManager.ts:65:25)
      at PublishManager.awaitTasks (C:\Users\MD\Desktop\stock-calc\node_modules\app-builder-lib\src\publish\PublishManager.ts:228:5)
      at Object.executeFinally (C:\Users\MD\Desktop\stock-calc\node_modules\builder-util\src\promise.ts:23:3)
  
  Error #2 --------------------------------------------------------------------------------
  TypeError: Cannot read property 'getType' of undefined
      at GitHubPublisher.doUploadFile (C:\Users\MD\Desktop\stock-calc\node_modules\electron-publish\src\gitHubPublisher.ts:190:36)
      at GitHubPublisher.doUpload (C:\Users\MD\Desktop\stock-calc\node_modules\electron-publish\src\gitHubPublisher.ts:170:23)
      at processTicksAndRejections (node:internal/process/task_queues:94:5)
      at GitHubPublisher.upload (C:\Users\MD\Desktop\stock-calc\node_modules\electron-publish\src\publisher.ts:87:5)
      at async Promise.all (index 3)
      at AsyncTaskManager.awaitTasks (C:\Users\MD\Desktop\stock-calc\node_modules\builder-util\src\asyncTaskManager.ts:65:25)
      at PublishManager.awaitTasks (C:\Users\MD\Desktop\stock-calc\node_modules\app-builder-lib\src\publish\PublishManager.ts:228:5)
      at Object.executeFinally (C:\Users\MD\Desktop\stock-calc\node_modules\builder-util\src\promise.ts:23:3)  failedTask=build stackTrace=Error: Cannot cleanup
  </code></pre>