Electron: dialog.showOpenDialog not returning a promise?
问题 I would like to show an Open Dialog box from within a rendered script. I am getting conflicting information from different sources, but, as far as I can tell, the documentation at https://electronjs.org/docs/api/dialog suggests I should be able to use: const dialog = require('electron').remote.dialog; dialog.showOpenDialog({ title: '…', defaultPath: '…' }) .then(data=>console.log(data)); The error message I get is: TypeError: dialog.showOpenDialog(...).then is not a function That suggests