Is this wrong or is it a new update


Hi! I have been using
“use strict”
var electron = require(‘electron’).app
var BrowserWindow = require(‘electron’).BrowserWindow
let win
function createWindow () {
win = new BrowserWindow({width: 1000, height: 800, allowRunningInsecureContent: true, webPreferences: {nodeIntegration: false})
win.on(‘closed’, () => {
win = null
electron.on(‘ready’, createWindow)
electron.on(‘window-all-closed’, () => {
if (process.platform !== ‘darwin’) {
electron.on(‘activate’, () => {
if (win === null) {

To make electron open a window going to pretendyou’ I dont know what happened but now i get a error saying

Can anyone help me port this or fix this?


Yes, i know that it is unexpected token. One thing though: This works for my other program running the old electron.


Please wrap your code in tags so that we can read it easily. It’s easy: just select the block of code and use the </> button above the editor.


You are missing a } in the createWindow function.


Thanks! Didn’t see that :smiley: