Electron: Cannot access dialog before initialization
问题 I have a renderer file that has the sole purpose of opening a dialog box to select files from. I have tried rewriting this so many times, and each time I get a different error. What am I doing wrong? Exact code: const { ipcRenderer, shell, remote } = require('electron') const dialog = remote.dialog; function openFileBrowser() { dialog.showOpenDialog(remote.getCurrentWindow(), { properties: ["openFile", "multiSelections"] }).then(result => { if (result.canceled === false) { console.log(