0

I have trouble integrating electron-updater into my project. I'm working on a windows system.

First I install electron-updater (via npm or yarn) which works without problems.

Then I load the package via import { autoUpdater } from 'electron-updater' or const {autoUpdater} = require('electron-updater')

Once I build and run the app, I get a App threw an error during load with following TypeError:

TypeError: Cannot read property 'name' of undefined
      at exports.fromCallback (E:\smaek-mm\node_modules\universalify\index.js:15:26)
      at Object.<anonymous> (E:\smaek-mm\node_modules\electron-updater\node_modules\fs-extra\lib\fs\index.js:57:27)
      at Object.<anonymous> (E:\smaek-mm\node_modules\electron-updater\node_modules\fs-extra\lib\fs\index.js:121:3)
      at Module._compile (module.js:642:30)
      at Object.Module._extensions..js (module.js:653:10)
      at Module.load (module.js:561:32)
      at tryModuleLoad (module.js:504:12)
      at Function.Module._load (module.js:496:3)
      at Module.require (module.js:586:17)
      at require (internal/module.js:11:18)

Tried different versions of electron-updater, electron-builder, node and npm, tried building via yarn, with or without distribution settings (generic) => All result in basically the same problem.

My project uses SimulatedGREG/electron-vue. One can recreate the issue by setting up an default boilerplate, installing electron-updater and uncommenting the prepared autoLoad code.

Any ideas? I'm basically stuck for a day, and can't find a way forward.

fseydel
  • 175
  • 1
  • 10

1 Answers1

0

It seems SimulatedGREG/electron-vue uses a very outdated version of electron:

"electron": "^2.0.4"

Actually this does work with the latest electron-builder:

"electron-builder": "^22.14.5"

But it does NOT work with the latest electron-updater:

"electron-updater": "^4.6.5"

Upgrading electron to latest version solved this issue:

"electron": "^16.0.3"    

More information on upgrading electron within electron-vue can be found here: SimulatedGREG/electron-vue #871

fseydel
  • 175
  • 1
  • 10