how do i fix a uncaught reference error?

Please specify node integration as true when the browser window (where this HTML file is embedded) was originally created in the main process.

function createAddItemWindow() {
//Create new window
addItemWindow = new BrowserWindow({
    width: 300,
    height: 200,
    title: 'Add Item',

    //The lines below solved the issue
    webPreferences: {
        nodeIntegration: true

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top