Questions tagged [electron-packager]

Use electron-packager for questions related to the packaging module for Electron apps

References

407 questions
29
votes
4 answers

electron package: reduce the package size

I made a simple Electron app: main.js const {app, BrowserWindow} = require('electron') const path = require('path') const url = require('url') let win function createWindow () { win = new BrowserWindow({ width: 800, height: 600, …
ar099968
  • 4,434
  • 5
  • 36
  • 88
15
votes
6 answers

'electron-packager' is not recognized as an internal or external command

I recently started using electron. I have successfully completed the 1st phase by creating a hello world app (included files index.html, main.js, package.json). Now I am trying to package the app using electron-packager but getting this error Steps…
Sidharth Gusain
  • 1,273
  • 1
  • 11
  • 20
13
votes
3 answers

How to pass an argument to electron when using electron-builder?

I'm building an application with Electron and packaging with Electron Builder. When running electron, I want to pass this command line argument: --enable-mixed-sandbox. Is it possible? How? This: …
pupeno
  • 256,034
  • 114
  • 324
  • 541
10
votes
3 answers

Electron executable not recognized by Nautilus

I'm not able to build an executable file of an Electron App with the following command: electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --prune=true --out=release-builds The build file, which is a…
Catalyst
  • 357
  • 4
  • 12
9
votes
1 answer

How to properly include twitter bootstrap in electron app?

This is my first electron app, which is based on quick-start app. I want to add twitter bootstrap's css. So I installed it like this: npm install bootstrap And included in the index.html like this:
Lamar
  • 1,453
  • 3
  • 19
  • 35
8
votes
1 answer

How to solve this error Module not found: Error: Can't resolve 'fs'

I have created new angular project with electron.I do need to set up the electron. I have got below errors. ERROR in ./node_modules/electron/index.js Module not found: Error: Can't resolve 'fs' in 'D:\PATH\desktop\node_modules\electron' My…
8
votes
1 answer

Increase Electron Memory limit

My electron app crashes as soon as the memory usage reaches 2,000 MB. I can test it by having this code in my main process file which intentionally raises the memory usage: const all = []; let big = []; all.push(big); for (let i = 0;…
7
votes
6 answers

Electron shows white screen when built

I'm learning electron and I've made an electron app that read and create files. When I start the application with "npm start" or "electron ." it works as intended but when I use the "npm run build" or "build -w" commands the application built just…
7
votes
3 answers

convert angular 4 application to desktop application using electron

I have developed application using angular 4. I need to develop desktop application for this web application . From my initial research i got the best solution is electron. Any one please suggest the steps to convert angular 4 application to…
user3541485
  • 1,283
  • 3
  • 16
  • 33
7
votes
3 answers

Packaging Keytar with an Electron app

I'm using electron-builder (16.6.2) to package my electron application which includes keytar (3.0.2) as a prod dependency. package.json file includes: "scripts": { "postinstall": "install-app-deps", "compile:dev": "webpack-dev-server --hot…
Kevin
  • 101
  • 1
  • 6
7
votes
3 answers

How to add an icon to electron application

I've got my electron build files for a win .exe and installer but the icons aren't mine. In my main.js file, I have code to attach the icon but I can only make it work inside of the createWindow function. Outside the function, I get an error…
Tim
  • 79
  • 1
  • 1
  • 3
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
  • 876
  • 11
  • 23
6
votes
2 answers

preload script not loaded in packaged app

I've made a small Electron app which needs to load a preload js file. When I start the app with electron ., it finds the file, but when the app is packaged, it doesn't. The call is made here: mainWindow = new BrowserWindow({ width: 800, …
Sergio
  • 113
  • 1
  • 7
6
votes
1 answer

File association with electron builder

I’m making a multi platform application with Electron and I’m trying to make the file association using electron-builder. I’ve added it to the configuration and that works fine, when I double click on a file, it opens the app, which is expected, but…
Javis Perez
  • 3,513
  • 3
  • 18
  • 25
6
votes
1 answer

How should i exclude all node_modules in electron-packager

I'm using electron-packager for creating an electron.exe of my app. I need to exclude all node modules . I tried the following --ignore=node_modules The above is not working. Any idea how to exclude all folders/ remove node modules in final build.
arun thatham
  • 470
  • 1
  • 4
  • 11
1
2 3
27 28