Skip to main content

All Questions

Tagged with
249 votes
11 answers
243k views

Electron require() is not defined

I'm creating an Electron app for my own purpose. My problem is when I'm using node functions inside my HTML page it throws an error of: 'require()' is not defined. Is there any way to use Node ...
Mari Selvan's user avatar
  • 3,772
16 votes
3 answers
35k views

How to display a JPG image from a Node.js buffer (UInt8Array)

I have a custom Node.JS addon that transfers a jpg capture to my application which is working great - if I write the buffer contents to disk, it's a proper jpg image, as expected. var wstream = fs....
Giallo's user avatar
  • 795
4 votes
1 answer
11k views

Cannot read property 'join' of undefined in Javascript file Electron JS

I have an application in Electron JS that is calling a python function to execute a python script. When the script executes it should send the data back to the Electron JS GUI and display it. The ...
ironmantis7x's user avatar
24 votes
5 answers
20k views

How to print a DIV in ElectronJS

i'm trying to convert my web into an app made in ElectronJS in my web i print a div with a barcode. this works pretty fine, but in electronjs i can't reach this. originally i'd use this function $...
Paulo Galdo Sandoval's user avatar
8 votes
2 answers
10k views

css border: 1px appear as 0.667px or 1px depending on the computer / display resolution (?)

This is weird. I am testing the same web application (Chrome embedded in Electron) and I have two exact copies in 2 computers, both windows 10, one with a 1080p display and the other with a 4K display ...
GWorking's user avatar
  • 4,211
4 votes
2 answers
9k views

JavaScript - Read metadata of video file

I've been at this for hours, it's time to ask for a little help. I need to know the frame rate of a video on load in JavaScript/HTML and I'm trying to avoid VLC plug-in or ffmpeg. The browser reads ...
João Pereira's user avatar
37 votes
9 answers
15k views

Disable pinch zoom in webkit (or electron)

Is there any way to disable pinch zoom in an electron app? I can't get it to work from inside the web-view with normal javascript methods as described here: https://stackoverflow.com/a/23510108/...
Billy Moon's user avatar
  • 58.5k
20 votes
4 answers
17k views

Using Firebase with Electron

I'm trying to use Firebase with Electron. When installing it just like I would on a web page it doesn't work because Electron pages are hosted locally and don't have a hostname. This is the error I'm ...
DaveJ's user avatar
  • 2,397
19 votes
10 answers
49k views

Select Text & highlight selection or get selection value (React)

I have a React application which displays some spans: <span>Hello</span> <span>my</span> <span>name</span> <span> is </span> ... I would like the user ...
George Welder's user avatar
12 votes
4 answers
7k views

Transparent Windows on Linux (Electron)

Using the transparent argument and setting it to true when creating a new BrowserWindow in Electron usually gives the window a transparent background... But on Linux that isn't the case for my ...
undefinedChar's user avatar
11 votes
1 answer
15k views

Electron "require is not defined"

I'm making an application which I need to give access to the file system (fs) module, however even with nodeIntegration enabled the renderer gives me this error: Uncaught ReferenceError: require is ...
noahkra's user avatar
  • 113
10 votes
2 answers
23k views

Using ipc in Electron to set global variable from renderer

renderer.js ipcRenderer.sendSync('setGlobal', 'globalVarName').varInner.varInner2 = 'result'; main.js global.globalVarName = { varInner: { varInner2: '' }, iWontChange: 'hi' }; ipcMain....
Ian W's user avatar
  • 960
7 votes
2 answers
35k views

Getting error "Strict MIME type checking is enforced for module scripts per HTML spec" when trying to import project

Trying to create some reusable components for our Electron screen using lit-html. When I attempt to add an example component I run into an error. Using electron: ^5.0.6 Trying to import module my-...
islalobo's user avatar
  • 637
6 votes
2 answers
18k views

Using the electron ipcRenderer from a front-end javascript file

I'm in the process of learning to use Electron, and while trying to have my application communicate with the front end I am aware I need to use the ipcRenderer to gain a reference to the DOM elements ...
ryno's user avatar
  • 906
6 votes
2 answers
14k views

Background image not loading in Electron Application

I have an image file in the same directory as my login.vue component (which is where the following code is located). But, when I try this code, the image will not load: <div background="benjamin-...
randyMoss1994's user avatar

15 30 50 per page