Node.js remote package is missing? #9996
-
In previous versions of Quasar i was using the following code in my utils.js file...
I've moved the following code into a electron-preload.js file but still get errors.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I've tried a variety of options and I can't seem to get either of these to work as they say remote does not exist. Anyone else exp this? const mainWindow = remote.getCurrentWindow(); |
Beta Was this translation helpful? Give feedback.
-
Please be aware of the Electron version that you are using and then plan your code accordingly. "This and that" not being available is not due to Quasar, but exclusively due to newer Electron. Use the electron-preload script to bridge between nodejs and your UI thread. https://quasar.dev/quasar-cli/developing-electron-apps/electron-upgrade-guide#the-electron-preload-js-file Also notice this in /src-electron/electron-main.js:
Read about how you can enable different Electron stuff (including the remote object if I'm not mistaken) through Regardless, googling about the Electron webPreference or looking directly into the Electron docs will untangle any "issues" you might have. |
Beta Was this translation helpful? Give feedback.
Please be aware of the Electron version that you are using and then plan your code accordingly. "This and that" not being available is not due to Quasar, but exclusively due to newer Electron. Use the electron-preload script to bridge between nodejs and your UI thread. https://quasar.dev/quasar-cli/developing-electron-apps/electron-upgrade-guide#the-electron-preload-js-file
Also notice this in /src-electron/electron-main.js:
Read about how you can enable different Electron stuff (including the remote object if I'm not mistaken) through
webPreferences
. But the defaults really have a reason to be…