updating to electron 5.0.0 occurs errors as shown below.
Note:
To install the final electro 5.0.0 it is necessary to install the packages before:
I've tried uninstalling and installing again, but to no avail!
So far I have returned to version 4.1.4 which is running smoothly.
default value of webPreferences.nodeIntegration is false in Electron 5.0.0
so what you can do is set it to true in src/main/index.js
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})
I have the same issue. Did you find a solution?
Hello.
I did it in my code as yaoleia commented.
It's work
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})
Thanks
Hello.
I did it in my code as yaoleia commented.
It's work
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})Thanks
could u send me your package.json?
@serhii-cherednyk
in index.js
replace:
mainWindow = new BrowserWindow({
height: 563,
useContentSize: true,
width: 1000
})
with:
mainWindow = new BrowserWindow({
height: 563,
useContentSize: true,
width: 1000,
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})
Most helpful comment
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})