install-app-deps: Configuring yargs through package.json is deprecated
See original GitHub issue-
Version: 20.39.0
-
Target: 4.0.8 on platform=win32 arch=x64
I have a few local native modules linked via file:
in package.json
.
> electron-builder install-app-deps
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
• electron-builder version=20.39.0
• loaded configuration file=package.json ("build" field)
• rebuilding native production dependencies platform=win32 arch=x64
What are the yargs errors about?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:34
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Stuck when creating credentials - Yargs through package.json ...
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Read more >Configuring yargs through package.json is deprecated and ...
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Read more >Electron-builder NPM
Specify the build configuration in the package.json as follows: ... add script "postinstall": "electron-builder install-app-deps" to your package.json .
Read more >electron-builder | Yarn - Package Manager
A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out...
Read more >Error when using the sqlite3 module in electron - Super User
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ivancuric It’s just weirdly documented.
As it says in the API docs:
Raw Options refer to the CLI options and there you’ll find this:
So CLI equals API arguments, i.e. you’d have to pass the command line arguments into the
package.json
sbuild
-property and hope you place them at the right position in the tree.Downside of this is obviously that you’d need several different scripts to pass data to the builder so that it does not always trigger a full chain-rebuild if you just want to drop a testing app into the release directory, so you’d have to do something like this to avoid this:
Same problem here when I tried to run code containing in my package.json file from the CLI (Terminal) on MacOS Mojave (was working well 3 months ago before my yesterday Electron update).
package.json
When I try to run
npm run build-mac
it gives me this error messageConfiguring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Thanks to @nathanlesage I finally found the solution. It wasn’t really clear for me about where I should put the build.js file et how to execute it (I’m not a Node JS pro). If someone is in my case, here are more detailed steps:
electron-builder --mac.
npm run myCustomScript
So now, my files looks like below and it works like a charm!
package.json (new)
myCustomScript.js