title: The "id" argument must be of type string. Received type object
body: <p>As I created my first app and run, I got this error.</p>
  <blockquote>
  <p>TypeError [ERR_INVALID_ARG_TYPE]: The &quot;id&quot; argument must be of type string. Received type object</p>
  </blockquote>
  <pre><code>const electron = require(&quot;electron&quot;);
  
  const { app, BrowserWindow } = require(electron);
  
  let createWindow = () =&gt; {
    let window = new BrowserWindow({
      width: 800,
      height: 600,
      webPreferences: {
        nodeIntegration: true,
      },
    });
  
    // load the index.html file
    window.loadFile(&quot;index.html&quot;);
    
    window.webContents.openDevTools();
  };
  
  app.whenReady().then(createWindow);
  
  // Quit when all windows closed
  app.on(&quot;window-all-closed&quot;, () =&gt; {
    if (process.platform !== &quot;darwin&quot;) {
      app.quit();
    }
  });
  
  app.on(&quot;active&quot;, () =&gt; {
    if (BrowserWindow.getAllWindows().length === 0) {
      createWindow();
    }
  });
  </code></pre>
  <p>What went wrong here?</p>