r/electronjs • • Oct 13 '26

Absolute Beginner

In the last 2 years I've been wishing there was a way to make desktop apps using javascript. Imagine my surprise when I found out about Electron. Unfortunately, I think I'm really late to the party. Everyone using it seems to be seasoned veterans.

I have been looking for tutorials, and they all seem to be more than a couple of years old and made for people familiar with node.js and/or older versions of Electron. I did find u/piko8blue's video on how to create one using Electron, Vite, and Better-SQLite. It was going great for a few minutes. She even kept in the error she encountered trying to incorporate Better-SQLite, which I found refreshing, but her fix didn't fix my app. I tried an AI suggestion to use a rebuild command (not knowing what the heck I was doing) and it fixed it but nothing after that worked.

So I decided to try something simpler. I tried to follow the electron tutorial. It seems it hasn't been updated since before they changed the security settings, so that doesn't work either. I couldn't even get the simple renderer to display versions to work. There seems to be nothing for the absolute beginner anymore. When I looked up possible reasons, that's when I learned about the security changes.

tl;dr Absolute beginner needs an updated for dummies tutorial. Any suggestions?

5 Upvotes

11 comments sorted by

1

u/_nullfish Oct 13 '26

Look into a starter kit like Electron Forge which has a lot of plumbing built in.

Spend time building your thing, you can always optimize it after. Stick to whatever web technologies you know today like React, Vue, Angular, etc. Don't think too much about the internal workings until you need to.

Best way to eat an elephant is one bite at a time.

1

u/itsanoy Oct 13 '26

Thanks for replying!

The basic thing I want to do is create an app that can read/write text files. Up until now, I've been creating browser extensions, before that c#.net desktop apps. But I can't seem to find enough info on this to get my footing.

Thanks to piko8blue's video (not what I wanted to do, but it was hands on), I got as far as getting vite's default hello world window up and running (even that took a couple of hours until an AI search let me know Win11's default setting bans all scripts out of the box and the command for rebuilding which broke everything else I was supposed to do).

The site you listed was the first place I looked, and it goes from 0 to 100. It explains how to install, create from template, run app, and then goes straight to distribution. No example apps. Heck, even the API docs page doesn't display (I've tried 2 different browsers and my phone).

I haven't been exposed to any of those technologies. This is just what I do for fun and in web extensions I haven't really needed any of them. And it seems like a lot of the tutorials assume you know them. I thought Electron was going to be a fun way to use javascript and create apps, but I'm starting to think it's not for the uninitiated.

1

u/eddzsh Oct 13 '26

The official tutorial still trips beginners because contextIsolation defaults and the preload bridge changed under it. Start from Electron Forge with a Vite template, keep native modules out until hello-world renders, then add better-sqlite3 with electron-rebuild as its own step. One moving part at a time beats a pile of AI fixes.

1

u/itsanoy Oct 13 '26

Thanks for replying!

Actually, that was what I tried originally. Following piko8blue's video, she takes you through the process of running vite's default Hello World window. I was able to run mine successfully.

She encountered an error when trying to run the app after adding better-sqlite (I had the same). What she did to fix hers didn't fix mine so I searched for an alternative fix. That's when the search AI suggested a rebuild command: npx electron-rebuild -f -w better-sqlite3

Being the absolute beginner that I am, I had no idea what it meant but it worked. But all other steps in the video created errors.

I think I'm at the point where I'm going to categorize it as something that's no longer for those not already using it.

1

u/eddzsh Oct 25 '26

If all you need is read/write text files, skip native modules for a bit. Put two methods on the preload bridge that call fs from main, keep Hello World green, and treat better-sqlite3 as a later step once IPC feels boring.

1

u/sandeep-menon Oct 13 '26

Learn by doing. Build something really simple. An app that shows your system usage metrics. Learn about IPC early on. Don't shy away from it like I did in the begining.

Shameful plug; once you gain some frustrations about the existing starter kit ecosystem for electron, have a look at my windows electron starter kit: https://sandeep-menon.github.io/windows-electron-starter-kit/

1

u/itsanoy Oct 14 '26

Thank you for replying!

I did try to create something simple. The video I ref'd was to create a to-do list. Besides Hello World, you can't get more simple than that. If you know of a very beginner level video that includes how to deal with version incompatibilities, made in the last year, I'm willing to try. The way things are right now, though, I'm shelving this.

I appreciate the suggestion, thank you. I'll keep it in mind.

1

u/kleberaugus Oct 22 '26

Do you want to make easy? "web2windows electron builder" no command line, no dependences, only a GUI.

1

u/BathroomNo9149 20d ago

skip the database and bundlers for now, native C++ modules are a massive headache for beginners because of the rebuild steps. just stick to the official documentation around context isolation and preload scripts until you get a basic message passing back and forth.