electron-builder: Unable to build on windows with 22.10.5

  • Version: 22.10.5

  • Electron Version: 11.1.1

  • Electron Type (current, beta, nightly): current

  • Target: windows

Building on an Azure DevOps build server. I have 2 builds and the only difference between a working and an non-working is the electron-builder version and that its a Windows target. The macos target builds fine.

working: electron-builder 22.9.1 not working: 22.10.5

here are the outputs. I’ll truncate the stacktrace as it doesn’t really have any value being repetative.

WORKING

D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand>npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=11.1.1 
  • electron-builder  version=22.9.1 os=10.0.17763
  • artifacts will be published if draft release exists  reason=CI detected
  • loaded configuration  file=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\bin\electron-builder.json
  • description is missed in the package.json  appPackageFile=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\package.json
  • packaging       platform=win32 arch=x64 electron=11.1.1 appOutDir=D:\a\1\s\dist\win-unpacked
  • downloading     url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip size=78 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip duration=3.946s
  • downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=567ms
  • building        target=nsis file=D:\a\1\s\dist\stackify-prefix.exe archs=x64 oneClick=true perMachine=false
  • downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z size=1.3 MB parts=1
  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z duration=352ms
  • downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z size=731 kB parts=1
  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z duration=405ms
  • building block map  blockMapFile=D:\a\1\s\dist\stackify-prefix.exe.blockmap
  ⨯ GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand>
... done

NOT WORKING

D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand>npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=11.1.1 
  • electron-builder  version=22.10.5 os=10.0.17763
  • artifacts will be published if draft release exists  reason=CI detected
  • loaded configuration  file=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\bin\electron-builder.json
  • description is missed in the package.json  appPackageFile=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\package.json
  • packaging       platform=win32 arch=x64 electron=11.1.1 appOutDir=D:\a\1\s\dist\win-unpacked
  • Unpacking electron zip  zipPath=undefined
  • downloading     url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip size=78 MB parts=4
  • downloaded      url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip duration=1.812s
  ⨯ editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.  stackTrace=
                                                                                                          Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
                                                                                                              at new Errlop (C:\npm\prefix\node_modules\electron-builder\node_modules\errlop\edition-es5\index.js:61:18)
                                                                                                              at Object.errtion (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\util.js:23:14)
                                                                                                              at determineEdition (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\index.js:317:21)
                                                                                                              at solicitEdition (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\index.js:350:16)
                                                                                                              at Object.requirePackage (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\index.js:364:9)
                                                                                                              at Object.<anonymous> (C:\npm\prefix\node_modules\electron-builder\node_modules\istextorbinary\index.cjs:4:38)
                                                                                                              at Module._compile (internal/modules/cjs/loader.js:1118:30)
                                                                                                              at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
                                                                                                              at Module.load (internal/modules/cjs/loader.js:982:32)
                                                                                                              at Function.Module._load (internal/modules/cjs/loader.js:875:14)
                                                                                                              at Module.require (internal/modules/cjs/loader.js:1022:19)
                                                                                                              at require (internal/modules/cjs/helpers.js:72:18)
                                                                                                              at Object.<anonymous> (C:\npm\prefix\node_modules\electron-builder\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)
                                                                                                              at Module._compile (internal/modules/cjs/loader.js:1118:30)
                                                                                                              at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
                                                                                                              at Module.load (internal/modules/cjs/loader.js:982:32)
                                                                                                          ↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 13
  • Comments: 37 (2 by maintainers)

Commits related to this issue

Most upvoted comments

for all having this issue right now, downgrade your nodeJS to anything below 16.0 or downgrading electron-builder to 22.10.4 might fix it as well, not sure

Thankfully this was fixed for me after downgrading NodeJS from 16.0.0 to 15.14.0.

FWIW my issue was fixed by upgrading from Node 13.8.0 to 15.12.0.

I have same issue when packing on electronuserland/builder:wine docker image with electron 12.0.1 and electron-builder 22.10.5. Downgrading electron-builder version to 22.10.4 resolved issue.

Stack trace when build failed is following.

      Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:317:21)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
      ↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:327:19)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
      ↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript source code made to be compatible with Deno] is not compatible with this environment.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:301:25)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
      ↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for Node.js 12 || 14 || 15 with Import for modules] is not compatible with this environment.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:301:25)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
      ↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 15 with Require for modules] is not compatible with this environment.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:301:25)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
      ↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ESNext for Node.js 14 || 15 with Require for modules] is not compatible with this environment.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:301:25)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
      ↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for web browsers with Import for modules] is not compatible with this environment.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:301:25)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
      ↳ Error: editions-autoloader-edition-incompatible: The edition [TypeScript source code with Import for modules] is not compatible with this environment.
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at isCompatibleEdition (/project/node_modules/editions/edition-es5/index.js:252:19)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:287:4)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/project/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
      ↳ Error: editions-autoloader-invalid-engines: The edition had no engines to compare against the environment
          at new Errlop (/project/node_modules/errlop/edition-es5/index.js:61:18)
          at Object.errtion (/project/node_modules/editions/edition-es5/util.js:23:14)
          at isCompatibleEngines (/project/node_modules/editions/edition-es5/index.js:183:19)
          at isCompatibleEdition (/project/node_modules/editions/edition-es5/index.js:250:10)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:287:4)
          at determineEdition (/project/node_modules/editions/edition-es5/index.js:312:12)
          at solicitEdition (/project/node_modules/editions/edition-es5/index.js:350:16)
          at Object.requirePackage (/project/node_modules/editions/edition-es5/index.js:364:9)
          at Object.<anonymous> (/project/node_modules/istextorbinary/index.cjs:4:38)
          at Module._compile (internal/modules/cjs/loader.js:738:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
          at Module.load (internal/modules/cjs/loader.js:630:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
          at Function.Module._load (internal/modules/cjs/loader.js:562:3)
          at Module.require (internal/modules/cjs/loader.js:667:17)
          at require (internal/modules/cjs/helpers.js:20:18)

Looks like this was fixed in 22.11.4 and a regression appeared in 22.11.5 that recreated the issue.

I ran the experiment I mentioned in my previous post and the build appears to work properly with 22.11.7 on Mac OS 10.15.7, Node 16.1, and an Intel processor. So if you’re seeing problems you probably need to first update all the related tools and then if still having trouble provide more details (and given the developer’s choice not to re-open this issue file a new one with the details needed to reproduce the problem).

This sucks, electron-builder breaks all the time and node-abi is always out of date.

Should be fixed in 22.11.4

On macOS: if you’re running zsh open Terminal and type vim ~/.zshrc press <enter>

Next press i to insert and add the following line to the top of the file: export PATH="$PATH:/usr/local/bin"

Then press esc and type :wq! and press <enter>

Close this Terminal window and open a new Terminal and re-run your command.

@quinton-ashley Can you do better? Theses packages depends on A LOT of stuff and we are very lucky to have this team. Please be constructive on repos you don’t own.

Looks like this was fixed in 22.11.4 and a regression appeared in 22.11.5 that recreated the issue.

It doesn’t seem like there’s any open issue tracking the new regression here… Should this be reopened, or should a new issue be filed?

It seems this issue really related to Node 16, we have it on Windows, Mac and Linux build in Github Actions. Get the same weird error “Unable to determine a suitable edition, even after broadening” (even with electron-builder changed to 22.10.4. https://github.com/ever-co/ever-gauzy/runs/2474464184)

So maybe @danatcofo can rename the issue title to include “Node 16 build issues” 😦

Update: switch to Node 15.4 helps right away (https://github.com/ever-co/ever-gauzy/actions/runs/799093744)

Also having this issue on M1 mac mini and node 16. downgrading electron-builder to 22.10.4 fixes the issue.

Tested working on windows with node 16

Same issue on a Mac here. Running Big Sur 11.31.

Downgrading from v16 to 15.14.0 did the trick.

For those wondering how to downgrade:

npm install -g n

n 15.14.0

(might need to run with sudo)

Same issue on MacOS Apple Silicon, switch to Node 15.14.0 is well.

Same iussue here on Manjaro and NodeJs 16.

Folks who want to be productive about this should probably re-test against 22.11.7 (the current version as of this message) and if the issue continues open a new issue for the bug. Include a reference to this issue and the fact that it appears to have been a regression in 22.11.5 to help the developers search for the breaking change. I haven’t had the time to do that myself in part because 22.11.4 still works for my project.

Hi @danatcofo, I’m honestly sure why the downloads would fail for electron-builder on local but not on the build server. It does indeed seem like an edge case.

Curious, if you change the electron version, would it still fail? Can you run with DEBUG=electron-builder and post what the logs throw out?