Closed salmanSOFTECH closed 3 years ago
This line is giving error
const { desktopCapturer, remote } = require("electron");
You need to modify webPreferences
option in index.js
,
From
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
});
To
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
// Add this line :
enableRemoteModule: true
}
});
Thank @zhao-huang that worked for.
This line is giving error
const { desktopCapturer, remote } = require("electron");