electron-quick-start | Clone to try a simple Electron app | Frontend Framework library
kandi X-RAY | electron-quick-start Summary
kandi X-RAY | electron-quick-start Summary
This is a minimal Electron application based on the Quick Start Guide within the Electron documentation.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Loads the browser window .
electron-quick-start Key Features
electron-quick-start Examples and Code Snippets
Community Discussions
Trending Discussions on electron-quick-start
QUESTION
Using: Electron v15.2.0 using the Electron Quick Start
I know this is a very simple problem, but I can't seem to find a solution for it. Here's the code.
main.js:
...ANSWER
Answered 2021-Oct-26 at 17:00I believe you're seeing this issue. ipcRenderer
does not have an on
method when in a (context-isolation-enabled?) renderer.
The solution is to move the ipcRenderer.on
logic inside of the preload script like so (full code example here):
QUESTION
My Problem
I upgraded my project from Electron 1 to 10 this month. I find that the following command is not working now. No code changes.
ANSWER
Answered 2021-Oct-15 at 10:45(V8 developer here.) Your analysis seems correct: Electron 9.0 enabled V8 pointer compression, and pointer compression implies that the maximum heap size is capped at 4GB (because compressed pointers use 32 bits per pointer).
Pointer compression is a build-time flag for V8. Embedders can freely choose whether to enable it or not, but the decision has to be made at build time, it can't be made at runtime. If you build your own Electron, you can change the configuration accordingly and recompile to turn off pointer compression. Node.js decided to disable pointer compression, which is why bigger heaps work there.
I suppose you could also ask the Electron project to provide prebuilt binaries without pointer compression, but I have no idea how likely they are to accommodate such a request.
Note that due to the memory-saving effects of pointer compression (which is why the feature exists!), a 4GB compressed heap is roughly equivalent to a 6GB uncompressed heap (the exact numbers depend on what your app is doing).
QUESTION
I decided to try and learn electron so I cloned the
electron quick start and installed the dependencies with npm i
and ran npm start
but I got this long error message:
ANSWER
Answered 2021-Jun-10 at 14:39Electron uses MacOS local frameworks, that weirdly enough, you don't seem to have on your computer.
Try to list your frameworks to confirm this: ls -al /System/Library/Frameworks/
If you don't have any, or miss some of them (depending on your OS version), chances are you won't be able to build anything native at all, and your system should be all broken by now (plus, CoreFoundation is the most important framework): a clean install of the latest XCode won't install those frameworks back AFAIK.
Then, your options are:
- reinstall macOS
- get those framework from another mac using the same macOS version
- grab them from your recovery
QUESTION
I'm learning electron, took electron-quick-start and made certain modifications to index.html, main.js and renderer.js following the tutorial at https://blog.logrocket.com/handling-interprocess-communications-in-electron-applications-like-a-pro/
index.html
...ANSWER
Answered 2021-Apr-28 at 19:37The code looks fine and should be executed when running. You might be looking at the wrong console? The log statements should appear in the console of the renderer window. To open the Developer Tools, you can press Cmd
+ Opt
+ I
(macOS) and Ctrl
+ Shift
+ I
(Windows).
You can find more information about debugging Electron applications in their documentation and the Developer Tools in Chrome's documentation.
QUESTION
I've already configured nodeIntegration
, contextIsolation
and enableRemoteModule
in main.js. But the following message still appears:
This error only happens when I try to import the lib.js file through the script.js.
...ANSWER
Answered 2021-Apr-12 at 00:04Try this lib method
QUESTION
I clone electron-quick-start demo, and test ipcMain function. Follow the document add this in main.js
...ANSWER
Answered 2020-Nov-26 at 20:07The index.html file of electron-quick-start demo contains the CSP rules:
QUESTION
https://ubuntu.com/tutorials/electron-kiosk#4-converting-the-electron-snap-into-a-kiosk-snap
Hello !
I have followed this tutorial but I don't manage to have it work properly, my probleme is that nodejs 8.10.0 is install when I need 10.12 at least. I have tryed to add node-version or node engine or other params but it donwload the version that I want after installing 8.10.0.
If someone can help me !!
[EDIT]
Some logs when I run snapcraft with nodejs-version: "12.18.3"
added after plugin: nodejs
ANSWER
Answered 2020-Sep-11 at 13:45At first remove nodejs from your computer:
QUESTION
i'm trying to test electron spectron testing. my project is very simple, just clone an electron quick start repo then write code to spec.js as written from the readme file from electron-userland/spectron
but when i run npm test, i face this error:
...ANSWER
Answered 2020-Sep-17 at 04:59i've downgrade my electron version to 9.3.1 and now my project working normally. You can find specific information about electron and spectron version that can support each other from electron-userland/spectron
QUESTION
I trying to build an Electron app. For that I'm using the following respos:
https://github.com/electron/electron-quick-start
https://github.com/electron-userland/electron-builder
In devoplement mode (electron .) everything works fine. But when I build the app and starting it, it just shows me a blank page without any errors in the dev console or build log.
Why doesn't it work in production? All my files are in one direction:
- index.html
- main.js
- renderer.js
- package.json
I didn't changed much in the base main.js file:
...ANSWER
Answered 2020-Jun-16 at 10:12That's because your output html in production should be located elsewhere, btw I'm using angular with electron and the output is in the dist folder, but I don't use url.format: try with mainWindow.loadURL(`file://$_dirname/index.html`)
or if you have a dist folder mainWindow.loadURL(`file://$_dirname/dist/index.html')
Try changing also
app.whenReady()
by app.on("ready",createWindow)
Hope it works afterwards
QUESTION
In a Nutshell: I am implementing a single-page website using Electron and encountered the common issue of jQuery not being globally accessible. So I simplified the problem by using the quick start example in the following in order to figure it out, but I cannot make sense of it.
As you can see, I have simply added the following code to the end of my main.js
file to check if the issue is resolved:
ANSWER
Answered 2020-Jun-05 at 06:38You're confusing your main and renderer processes. With Electron, all code that is responsible for your UI, i.e. the JavaScript attached to the HTML loaded in the BrowserWindow
s run in renderer processes, all other code, which, for example, is responsible for opening the windows or for setting up you app
runs in the main process.
In this main process, you cannot use DOM-specific globals because the main process is a pure Node.js thing. What you wanted to do with jQuery, i.e.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-quick-start
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page