GitHub user erisu added a comment to the discussion: How to update 
electron-builder version with cordova-electron: 3.0.1

To follow up on the previous solutions, consider the following alternative:

```bash
cordova create test
cd test
npm pkg set overrides.cordova-electron.electron-builder="^24.9.1"
cordova platform add electron@latest
cordova build electron --release
```

Before installing the `cordova-electron` platform, update the `package.json` 
file to include the `overrides` setting using the `npm pkg set` CLI command:

```bash
npm pkg set overrides.cordova-electron.electron-builder="^24.9.1"
```

This command will insert the following block into the `package.json` file:

```json
"overrides": {
  "cordova-electron": {
    "electron-builder": "^24.9.1"
  }
}
```

This approach allows npm CLI to handle the file update instead of manual 
editing.

Once the `overrides` are set, when adding the platform, it will fetch the 
version defined in the `overrides` property. Since `package.json` is versioned, 
if you are using a CI service to build, it will also know to fetch the 
overridden version.

Ensure you are using npm 8 or greater to support the `overrides` functionality.
```

GitHub link: 
https://github.com/apache/cordova/discussions/462#discussioncomment-8645385

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscr...@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to