How to use eel with electron using mode='electron'?
See original GitHub issueHello!!
I only have very little knowledge about node.js, so I could not use electron. But eel seems pretty easy to get started with. My system only has firefox installed, so the program I wrote didnāt run initially. And although using mode = 'chrome-app'
allowed me to run the app, it opens as a new tab on my browser. I was going through the documentation just now, and I saw the following line that really got me excited:
mode, a string specifying what browser to use (e.g. āchromeā, āelectronā, āedgeā, ācustomā). Can also be None or False to not open a window. Default: āchromeā
So, I installed electron using npm and wrote the following dummy code to check if it works.
import eel
PORT = 8001
eel.init("./static")
@eel.expose
def print_booking_status(x, date):
if(x==True):
print(f"Booked Successfully for date {date}")
else:
print("Booking Cancelled");
eel.start("index.html", mode='electron', port=PORT)
But Iām getting an error that says electron installation was not found.
OSError: Canāt find Electron installation
I also tried a global installation of electron, but it still didnāt work. Can anyone provide any suggestions to run my code through electron? And is it even possible?
- I know that if I donāt provide a sample code that allows someone to quickly step into my shoes, I may not get the help I want or my issue may be closed.
Desktop (please complete the following information):
- OS: GNU Linux (Pop!_OS)
- Browser: Firefox
- Version: 88.0.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top GitHub Comments
like this š
To use electron with eel try checking the example below: https://github.com/ChrisKnott/Eel/tree/master/examples/09 - Eelectron-quick-start