I'm still putting the pieces back from the disk crash that happened earlier in May. The rainbow cursor mess.
The other day I wanted to do some work with Electron.
There's an Electron version of the 1999.io app.
I wanted to have another look at that, and another project I'm working on that's also Electron-based.
So I needed to reinstall Electron. So I did. And nothing worked.
Now the question is, did I do something weird when I last installed Electron that I'm now forgetting. I looked back over my notes. Nothing obvious.
So I waited for a fresh start, and sat down with a nice glass of iced coffee, and set about figuring out what was wrong.
I'll save all the blind alleys and wrong guesses.
Two things changed.
Now, instead of this:
var remote = require ("remote");
var dialog = remote.require ("dialog");
You now say:
var remote = require ("electron").remote;
var dialog = remote.dialog;
Apparently I had an older version of Electron and there was a breaking change in an intervening version. I hate it when that happens. Look away for awhile and your app breaks in mysterious ways. Oy.
Anyway now it's documented. ;-)