Vue-cli-plugin-electron-builder: Error running electron:build script from package.json

Created on 12 Mar 2019  路  8Comments  路  Source: nklayman/vue-cli-plugin-electron-builder

Im trying to run "electron:build" command, but it gives an error:
"UnhandledPromiseRejectionWarning: TypeError: yargs.parserConfiguration is not a function"
in the builder.js of electron builder node module.

To Reproduce
Run electron:build script from package.json

Expected behavior
Building script end up with success and a new dist file.

Environments:

  • OS and version: Mac - version: 10.14
  • node version: V11.3.0
  • npm version:V6.4.1
  • yarn version: V1.2.1
  • vue-cli-plugin-electron-builder version : ^1.1.2
  • electron version: ^4.0.0

Most helpful comment

That is electron-builder's issue, not mine. They use the JS api as well, but keep the package.json config for some reason. If there isn't an issue open on their repository already, I'd suggest opening one.

All 8 comments

Seeing the same thing on Windows and Ubuntu.

I've some suspect on electron-builder version > 20.38.5

To fix it, waiting for further analysis, I used a yarn.lock from a similar project created a couple weeks ago.
This yarn.lock has electron-builder version 20.38.5, but of course it has different version of other packages too.

Same issue. 20.39.0 electron-builder fails, 20.38.5 old yargs log works fine. But old yarn.lock has version of vue-cli-plugin-electron-builder version 1.0.4
Fails on all OSes, Ubuntu, Windows, OSX

218 says that electron version should be pinned down :)

fixed in v1.1.3, thanks for the report and investigation!

Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.

That is electron-builder's issue, not mine. They use the JS api as well, but keep the package.json config for some reason. If there isn't an issue open on their repository already, I'd suggest opening one.

Upgrade vue-cli-plugin-electron-builder vesrion to v1.1.3 fixed the problem, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

getflourish picture getflourish  路  5Comments

thislooksfun picture thislooksfun  路  6Comments

fridzema picture fridzema  路  4Comments

grantdfoster picture grantdfoster  路  3Comments

iamazik picture iamazik  路  5Comments