• Ask a Question
  • Create a Poll
150
    Ask a Question
    Cancel
    150
    More answer You can create 5 answer(s).
      Ask a Poll
      Cancel

      electron.js | ipcRenderer and ipcMain cause white / blank screen

      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();   }, 
      1 Answers

      I solved the problem by setting nodeIntegration: true at main process.

      Answered by Kareemdorotheabarbara on July 16, 2020..