Progress bar not showing but getting require is not defined
I am using electron 5.0.0 node - 11.1.0 npm - 6.9.0 electron-progressbar - 1.2.0
I am getting an error in require("electron").ipcRenderer.on("CREATE_PROGRESS_BAR", (event, settings) => { this line.
After I add this line webPreferences: {nodeIntegration: true} in browserWindow options...it started working. Could you please fix this.
Hello brother, I solved this by including following code in the source code of electron progress bar, this code need to be included in the browser window code of
webPreferences: {
nodeIntegration: true
}
So the chaged source code looks like this
browserWindow: {
parent: null,
modal: true,
resizable: false,
closable: false,
minimizable: false,
maximizable: false,
width: 500,
height: 170,
webPreferences: {
nodeIntegration: true
}
}
Duplicate to : https://github.com/AndersonMamede/electron-progressbar/issues/10
See there for a solution how you can set nodeIntegration to true without editing the code :)
electron-progressbar v2.0.0 has just been released, and now nodeIntegration is enabled by default. See changelog here