解决 electron-builder 在 install-app-deps 时报错 editions-autoloader-none-broadened 的问题

本机环境:

  • Windows 10 专业版 21376.1

  • nodejs v16.0.0

错误提示如下:


$ electron-builder install-app-deps

F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61

               _this = _super.call(this, input.message || input) || this

                ^

Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.

   at new Errlop (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:317:21)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.

   at new Errlop (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:327:19)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

↳ 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 (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:301:25)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

↳ 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 (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:301:25)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

↳ 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 (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:301:25)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

↳ 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 (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:301:25)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

↳ 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 (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:301:25)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

↳ Error: editions-autoloader-edition-incompatible: The edition [TypeScript source code with Import for modules] is not compatible with this environment.

   at new Errlop (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at isCompatibleEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:252:19)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:287:4)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

↳ Error: editions-autoloader-invalid-engines: The edition had no engines to compare against the environment

   at new Errlop (F:\ElectronProjects\azur-mc-helper\node_modules\errlop\edition-es5\index.js:61:18)

   at Object.errtion (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\util.js:23:14)

   at isCompatibleEngines (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:183:19)

   at isCompatibleEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:250:10)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:287:4)

   at determineEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:312:12)

   at solicitEdition (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:350:16)

   at Object.requirePackage (F:\ElectronProjects\azur-mc-helper\node_modules\editions\edition-es5\index.js:364:9)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\istextorbinary\index.cjs:4:38)

   at Module._compile (node:internal/modules/cjs/loader:1108:14)

   at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)

   at Module.load (node:internal/modules/cjs/loader:988:32)

   at Function.Module._load (node:internal/modules/cjs/loader:828:14)

   at Module.require (node:internal/modules/cjs/loader:1012:19)

   at require (node:internal/modules/cjs/helpers:93:18)

   at Object. (F:\ElectronProjects\azur-mc-helper\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)

解决方案:

将 nodejs 降级至 v16 以下即可(本人降级至 v14.16.1 LTS 版本可用)

参考:

Unable to build on windows with 22.10.5 · Issue #5668 · electron-userland/electron-builder (github.com)

你可能感兴趣的:(解决 electron-builder 在 install-app-deps 时报错 editions-autoloader-none-broadened 的问题)