Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

Development Uses Different Electron Version than Release

Open Silvenga opened this issue 3 years ago • 0 comments

  • Version: 13.5.1
  • Target: Windows

Development builds e.g. via electronize start install Electron ^13.1.5 which causes NPM to automatically upgrade to 13.6.9 (see the ^) which differs from the hardcoded version used for electron-builder (13.1.5). This can cause runtime behavior changes and hair loss.


Due to the lack of validation on the side of electron-builder, a workaround looks like:

electronize build /target win /electron-params "-c.electronVersion=13.6.9"

Which results in the command:

npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=13.1.5 -c.electronVersion=13.6.9

Which results in version 13.6.9 being used.

downloaded      url=https://github.com/electron/electron/releases/download/v13.6.9/electron-v13.6.9-win32-x64.zip duration=3.716s

Of course, here be dragons. But if you need a slightly newer version of Electron...

Silvenga avatar Aug 01 '22 19:08 Silvenga