From 2f14668c145ed8baa17ecf630538a0af252bc969 Mon Sep 17 00:00:00 2001 From: viktor-c Date: Fri, 20 Nov 2020 23:02:31 +0100 Subject: [PATCH] nodeIntegration needed newer versions of node.js change default nodeIntegration to false, this leads to an error about require() in main.html. By setting this to true let's the app start again. :) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7c61d60..2bf093a 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ var knex = require("knex")({ }); app.on("ready", () => { - let mainWindow = new BrowserWindow({ height: 800, width: 800, show: false }) + let mainWindow = new BrowserWindow({ height: 800, width: 800, show: false , webPreferences: {nodeIntegration: true}}) mainWindow.loadURL(url.format({ pathname: path.join(__dirname, 'main.html'), protocol: 'file',