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
148 votes
5 answers
65k views

electron-builder vs electron-packager [closed]

What is main difference between electron-builder and electron-packager. Is there some example projects for both? Which is better for standalone .exe application build?
Ondrej Sika's user avatar
  • 1,745
103 votes
6 answers
108k views

How to use preload.js properly in Electron

I'm trying to use Node modules (in this example, fs) in my renderer processes, like this: // main_window.js const fs = require('fs') function action() { console.log(fs) } Note: The action ...
Amir Shabani's user avatar
  • 4,087
97 votes
24 answers
433k views

How do I reload a page with react-router?

I can see in this file (https://github.com/ReactTraining/react-router/blob/v0.13.3/modules/createRouter.js) that there is a refresh function but I have no idea how to call it. I'm fairly new to react-...
Sheriff's user avatar
  • 1,107
97 votes
6 answers
73k views

Where to store user settings in Electron (Atom Shell) Application?

I can't seem to locate a built in mechanism to store user settings. I was hoping that electron provided a standard method for storing user settings across all desktop platforms. If there isn't a ...
CodeManiak's user avatar
  • 1,933
94 votes
4 answers
103k views

How to access DOM elements in electron?

I am trying to add functionality to a button in index.html file is as follows: I have a button element in index.html <button id="auth-button">Authorize</button> In main.js of the app, I ...
ant_1618's user avatar
  • 1,961
83 votes
10 answers
75k views

electron 5.0.0 "Uncaught ReferenceError: require is not defined"

I had initially been using electron stable (4.x.x), and was able to use require in both my browser and renderer processes. I upgraded to electron beta (5.0.0) because I needed a newer version of node ...
junvar's user avatar
  • 11.5k
83 votes
12 answers
98k views

Make a link from Electron open in browser

Is there any (simple/built-in way) to open a new browser (I mean default OS browser) window for a link from Electron instead of visiting that link inside your Electron app ?
saadel's user avatar
  • 1,737
81 votes
11 answers
85k views

How to use React Router with Electron?

Using this boilerplate as reference I created an Electron app. It uses webpack to bundle the scripts and express server to host it. Webpack config is practically same as this and server this. ...
Frozen Crayon's user avatar
77 votes
2 answers
24k views

What is the Client/Server model when using Electron (Atom Shell)?

I'm trying to wrap my head around how Electron (formerly Atom Shell) works. I'm coming from a traditional, MVC-style web application where a Browser is calling a Controller Action through a Routing ...
Michael Stum's user avatar
76 votes
8 answers
69k views

Electron.js How to minimize/close window to system tray and restore window back from tray?

I want my Electron.js application to live on system tray and whenever the user wants to do something they can restore from the system tray do something and minimize/close it back to system tray. How ...
miqe's user avatar
  • 3,309
71 votes
1 answer
179k views

How To Compile An Electron Application To A .exe [duplicate]

I've been learning how to create applications in Electron and I need help compiling a simple project to a Windows executable. The program is a clone from this Github repo: https://github.com/electron/...
Mitch Mitchell's user avatar
70 votes
1 answer
3k views

How to read audio data from a 'MediaStream' object in a C++ addon

After sweating blood and tears I've finally managed to set up a Node C++ addon and shove a web-platform standard MediaStream object into one of its C++ methods for good. For compatibility across ...
John Weisz's user avatar
  • 31.3k
68 votes
3 answers
131k views

Saving files locally with electron

I have some template files that contain a few variable strings each, I'd like to build a very simple input form with Electron (https://www.electronjs.org/) and I want to save the composed output file ...
Adriano's user avatar
  • 3,906
62 votes
6 answers
87k views

Uncaught Error: Cannot find module 'jquery'

I am using Electron to make a desktop app. In my app I am loading a an external site (outside Atom app) lets say http://mydummysite/index.html page. Here is the structure of my app in Atom Editor: i....
Raghav's user avatar
  • 9,380

15 30 50 per page
1
2 3 4 5
424