All Questions
Tagged with electron javascript
2,853
questions with no upvoted or accepted answers
13
votes
2
answers
2k
views
Node.js Electron Applications for Single Core Windows 7 machines are slow on file I/O
I'm running an electron application on a single core windows 7 machine. It seems whenever I do almost any file I/O with the fs library, the CPU spikes to ~100% for the electron process and it can take ...
12
votes
1
answer
8k
views
ElectronJS: Must use import to load ES Module
I've just started learning Electron from Electron Docs. I used ES6 (import/export) while they used require.
I've added type:module in my package.json and also I've changed the js extension to mjs, but ...
10
votes
0
answers
889
views
require vm2 using electron and webpack
I encounter an error when I try to import the vm2 module inside the Electron renderer process using Webpack.
import fs from 'fs'
console.log('ok')
const { NodeVM } = require('vm2')
console.log('ko'...
9
votes
0
answers
3k
views
Best way to stream large local media files with electron main process and handle them in the renderer process
Hello there,
I will try to be more specific about my question, I'm using angular 9 and latest electron version 8.1.1.
My goal is to read large media files like videos(>4go), songs(flac) or other ...
9
votes
0
answers
1k
views
electron drag and drop remote files on desktop
Objective:
Use Electron`s Native File Drag & Drop to drag remote files out of electron-app into the operating system's world for example on desktop or some opened folder
Approach:
renderer
In ...
9
votes
0
answers
690
views
Don't prevent default action in Electron using globalShortcut
I use
var globalShortcut = require('electron').globalShortcut;
For open application window after key press
var ret = globalShortcut.register('CommandOrControl+X', function() {
console.log('...
9
votes
1
answer
1k
views
How to serve static files from an asar archive
I am trying to build an electron app with a server component using express for remote control.
The express module initializes with
var staticPath = path.resolve('app/assets')
setupNotifications(...
9
votes
1
answer
1k
views
Remove app data on uninstall on mac in Electron js
I have created an electron app and built it using electron-builder On app uninstall I need to delete the data that localStorage, kind of access tokens, etc.
In windows there is nsis - ...
8
votes
1
answer
2k
views
Efficient way to get the actual filename in a case-insensitive filesystem in node
This is NOT a dupe of this question. This question is NOT about Windows. It's a general question across OSes.
Is there an efficient way to get the correct case of a filename in node.js other than ...
8
votes
0
answers
920
views
Firebase SDK signInWithPopup() not working with Electron
I have an electron app that fires up a lightweight express server allowing me to use http in production for firebase github authentication.
I have this working fine using the signInWithRedirect() ...
8
votes
1
answer
712
views
Display .icns file in electron renderer process
I'm looking for a way to display .icns files in electron renderer.
In osx all icons (system icons, applications icons) stored in .icns format. I need to show these icons in my electron application.
...
8
votes
1
answer
2k
views
Adding electron application path to user environment variables after install
Problem description:
I have an electron application and I need to add the application to user environment variables after users install my application, so that they can run commands like this my-...
8
votes
1
answer
966
views
Frameless Browser window zero height
I'm creating a new frameless Browser window in Electron, with its height and width set at 0 but, at least in windows, the window is shown with some width and height.
Also i have not loaded any ...
7
votes
1
answer
890
views
How Can I set environment variables into the executable electron forge build?
I'm building an Electron app using Electron Forge and I need to pass environment variables to the final executable.
I've tried defining the environment variables in forge.config.js like this:
env: {
...
7
votes
0
answers
331
views
Make an non-electron window parent to an electron app
I want my electron browser window to be child of the desktop window handle (hWND) in windows 10 which you can get from the c++ win32 API. So I need to create a BrowserWindow or somehow make the ...