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:
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
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!
Most helpful comment
That is electron-builder's issue, not mine. They use the JS api as well, but keep the
package.jsonconfig for some reason. If there isn't an issue open on their repository already, I'd suggest opening one.