I am creating a desktop app by using Electron, Vue + Vuetify but when I try to send something from rendererProcess to mainProcess with IPC, there becomes a white and blank screen, I do not know what caused this error.
// Main process
ipcMain.on('fileOps', (event, args) => { });
// Renderer side
const ipcRenderer = require("electron").ipcRenderer const buttonClicked = () => { ipcRenderer.send("fileOps", "test"); } module.exports = buttonClicked import buttonClicked from "../renderer/file.js"; export default { mounted() { buttonClicked(); },
I solved the problem by setting nodeIntegration: true at main process.