Questions tagged [electron-builder]

Electron Builder is an open source solution for distribution and auto-update of Electron NPM apps. Use this tag on questions about a) using Electron Builder to distribute or update an Electron app, or b) working with the Electron Builder project source.

Electron Builder is an project that provides distribution and auto-update for Electron-based apps.

Electron Builder provides these services:

  • Management of NPM packages:
    • Native application dependencies compilation
    • Development dependencies are never excluded
  • Management of build versions
  • Code Signing (CI server, development machine)
  • Auto Update support
  • Multiple target platforms and distribution formats:
    • All platforms: 7z, zip, tar.gz, tar.xz, tar.lz, tar.bz2
    • MacOS: dmg, mas
    • Linux: AppImage, deb, rpm, apk, freebsd, pacman, p5p
    • Windows: NSIS, Squirrel.Windows
  • GitHub Releases integration for artifacts

and are used under the hood.

Resources:

1393 questions
6
votes
1 answer

Building electron linux distro : The SUID sandbox helper binary was found, but is not configured correctly

I am generating electron distro for linux. This is how the app is built This is how app is built in packge.json "builderForLinx": "electron-packager --out linx64 --overwrite --platform linux --appname myApp --asar" this app structure myApp ->…
karansys
  • 2,449
  • 7
  • 40
  • 78
6
votes
2 answers

How to add worker thread in Electron JS?

How do we add worker thread in Electron JS? I have tried below which works fine in dev mode. const worker = new Worker(path.join(__dirname, 'worker.js')); But this causes error when the app is packaged, it is looking for worker.js inside app.asar.…
Ram Kumar
  • 828
  • 2
  • 10
  • 27
6
votes
2 answers

How can I change Environments variables in Electron between production and stage

I want to change API URL depending on the environments. for example production: https://example.com stage: https://stage.example.com local: https://localhost:3001 In Electron, How can I set Environment variables? I tried to change production name…
Mikinovation
  • 107
  • 1
  • 1
  • 8
6
votes
1 answer

Packaged electron app on MacOS wont spawn child node process

I have created an electron app which when run in the main process will spawn a node child process which will serve some html content. app.on('ready', () => { //check for port 80 const port = 80; find('port', port) .then(function (list) { …
6
votes
0 answers

TypeError: fs.existsSync is not a function (Vue/Electron)

Trying to access electron from within vue and it throws a TypeError. TypeError: fs.existsSync is not a function at getElectronPath (index.js?bdb9:7) at Object.eval (index.js?bdb9:18) at eval (index.js:20) Searching the google wasn't much…
Sam Luther
  • 1,170
  • 3
  • 18
  • 38
6
votes
1 answer

Packaged Electron app can't find local module

I have an Electron app, based off of the electron-react-boilerplate template project. In my app, I have a class in a myClass.js file in app/utils/myClass.js class MyClass { // A bunch of stuff... } module.exports = MyClass; I reference this class…
Display name
  • 1,109
  • 1
  • 15
  • 31
6
votes
1 answer

How to Restrict Unpacking of app.asar of an electron app?

I have created an electron application and packaged it with electron builder, there's always a .asar file in some resources folder after application installation that can easily be extracted with the help of npm libraries like asar. Is there any way…
6
votes
0 answers

Can I update my Electron app with a zip file using Electron Builder?

I'm using Electron Builder for packaging my app and handling auto-updating. Is it possible to have my application auto-update from a zip file in a static directory? It says only NSIS is supported for auto-updating, which I think means that using…
HaulinOats
  • 3,628
  • 4
  • 21
  • 24
6
votes
1 answer

Electron-packager - The "path" argument must be of type string. Received type undefined

I have been struggling with this issue and could not figure it out. Similar problems were posted which solutions suggested node version had a glitch or package versions should be down/upgraded. I have tried it with modifying the node versions,…
Ben
  • 953
  • 12
  • 27
6
votes
0 answers

Trust custom CA in electron-builder's autoUpdater, without importing to system

How can we programmatically make the autoUpdate of electron-builder trust a specific custom CA certificate when fetching updates using the GenericHTTPServer provider? The solution should not involve importing the certificate to the system and should…
6
votes
2 answers

Codesigning a Windows build with electron-builder, on a Mac, not working

I am getting an issue code-signing a Windows .exe build, on a Mac, using a .p12 certificate generated by Apple, and stored in the Mac keychain. My electron-builder version is: 20.28.1 And the target build i'm trying to run is a Windows ia32…
Antonio de Perio
  • 343
  • 5
  • 13
6
votes
2 answers

Distributing an Electron app on Windows, Mac and Linux

I've spend my weekend experimenting with Electron and this caused a few questions and dilemmas in my head. I cloned the following Github repository to test with: electron-vue-typescript-starter This project uses electron-builder to build the…
6
votes
2 answers

Embed Mongodb with Electron

I am keeping MongoDB source code inside electron source code and running MongoDB using this command : const app = require('electron').app; const child_process = require('child_process'); const dbInstanceDir = app.getAppPath(); const startMongo =…
Rohit
  • 2,987
  • 3
  • 25
  • 50
6
votes
1 answer

Does electron-builder minify code or do I have to do that myself?

My electron application is getting bigger and bigger, with lots of HTML, JS and CSS source files. What I need to know is if when creating the distribution with electron-builder by running yarn dist, the JS/CSS files are minified? Do I have to do…
bMain
  • 324
  • 3
  • 11
6
votes
3 answers

Passing command line arguments to electron executable (after installing an already packaged app)

I'm trying to pass command line arguments to my already packaged app on execution. (Already packaged with electron-builder and installed the .dmg on my mac) I navigated into the /Applications/myApp.app/Contents/MacOS folder where the application…
Lucca
  • 1,447
  • 4
  • 16
  • 20