Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

187
Vistas
Cannot get property of undefined browser window

When running electron 13.1.X and above I get the error - menuHandler.js:8 Uncaught TypeError: Cannot read properties of undefined (reading 'getBrowserWindow').

code from main.js

const { electron, app, Notification, ipcMain } = require('electron');
var Path = require('path');
var url = require('url');
const { BrowserWindow } = require('electron');

The error occurs from menuHandler.js:8

const { remote } = require("electron");
const Window = remote.getBrowserWindow();

And so, I can't use the function:

$("#minimize").click(function() {
Window.minimize();

});

Here it throws an error passing the above message, meanwhile it works fine on older versions of electron. Please how can I fix this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Remote was removed from the main electron package, you have to install @electron/remote on your project.

To use this new electron remote add this to your main file:

require('@electron/remote/main').initialize();
const { BrowserWindow } = require('electron');
const window = new Browser window();
require("@electron/remote/main").enable(window.webContents);

On your renderer:

const { BrowserWindow } = require('@electron/remote');

Readme of the new remote module: https://github.com/electron/remote#migrating-from-remote

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda