Tag Archives: Uncaught ReferenceError: process is not defined

Uncaught ReferenceError: process is not defined [How to Solve]

Uncaught ReferenceError: process is not defined

I found that many blogs just added
nodeIntegration: true,
1 and
still report this problem

Solution
# Add another line of
contextIsolation: false
1
2
# Complete code
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname,’preload.js’),
// nodeIntegration : true
nodeIntegration: true,
contextIsolation: false
}
})