Electron app not showing, no errors

I’m trying to write my first electron app and the window will not show, the console works and I am able to interact with it however the electron window will not show.

const electron = require(“electron”)
const url = require(“url”)
const path = require(“path”)

const {app, BrowserWindow} = electron;

let mainWindow;

app.on("ready", function*(){
    mainWindow = new BrowserWindow({});
        pathname: path.join(__dirname, "index.html"),
        protocol: "file",
        slashes: true


<!DOCTYPE html>
<html lang="en">
        <title>Hello, World</title>
        <h1>Hello, World</h1>

I also forgot to mension I’m using Visual Studio Code with Node.js on Windows 10

Is the * in app.on("ready", function*(){ a typo?
Because that shouldn’t be a generator function, that’s probably what’s breaking it.