electron-progressbar icon indicating copy to clipboard operation
electron-progressbar copied to clipboard

Progress bar not showing but getting require is not defined

Open titusbensigar opened this issue 7 years ago • 3 comments

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.

titusbensigar avatar May 06 '19 19:05 titusbensigar

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				
				}
			}

thepraveenpratap avatar May 09 '19 11:05 thepraveenpratap

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 :)

KinNeko-De avatar Jun 30 '19 22:06 KinNeko-De

electron-progressbar v2.0.0 has just been released, and now nodeIntegration is enabled by default. See changelog here

AndersonMamede avatar Dec 09 '20 00:12 AndersonMamede