So I’m very new to Angular and Electron, and I've been having difficulties getting things to work. I've been looking for sample apps so that I could have a starting point that I could understand, and I came across this: https://developer.okta.com/blog/2019/03/20/build-desktop-app-with-angular-electron
I've been following it, and at the point where I first run npm run electron the window opens but stays empty, and in the devtools console I find Uncaught TypeError: window.require is not a function.
I had made just some minor adjustments (making some types explicit) because initially it wouldn't compile, but nothing that should change anything about this.
I have done some searches and for what I understand it might have something to do with
const electron = (<any>window).require('electron');
not being in electron/main.ts, but I genuinely don't know what I'm supposed to do. I tried adding webPreferences: {nodeIntegration: true} in the BrowserWindow constructor, but to no avail.
I'm at a loss; I don't understand the framework enough to resolve it myself.
Edit: npm v6.14.8, node v10.19.0, electron v12.0.1