Uncaught ReferenceError: require is not defined at code example
Example 1: electron Uncaught ReferenceError: require is not defined at recorder.js:1
app.on('ready', () => {
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});
});
Example 2: require is not defined
remove "type": "module" from package.json