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

1.4K
Vistas
Electron: electron-builder unable to load preload script

I have an issue with Electron unable to load BrowserWindow preload script. With the next error line:

Unable to load preload script: C:\Users\user\AppData\Local\Programs\myApp\resources\app.asar\electron\preload.js

Here are the versions I use: "electron": "^11.0.1", "electron-builder": "^22.3.6". Also here is the script I launch the new window:

const win = new BrowserWindow({
  width: 1400,
  height: 900,
  frame: false,
  title: title.name,
  webPreferences: {
    frame: false,
    webviewTag: true,
    nodeIntegration: true,
    enableRemoteModule: true,
    nodeIntegrationInWorker: true,
    preload: path.join(`${__dirname}/electron`, 'preload.js'),
  },
});

The weird part about this is that I have another Electron app with an older Electron version and I have no issues whatsoever, versions: "electron": "^8.2.3" & "electron-builder": "^22.5.1".

const win = new BrowserWindow({
  width: 1400,
  height: 900,
  frame: false,
  title: title.name,
  webPreferences: {
    preload: path.join(`${__dirname}/electron`, 'preload.js'),
    nodeIntegration: true,
    nodeIntegrationInWorker: true,
    webviewTag: true,
  },
}); 

The only differences I have is nodeIntegrationInWorker and enableRemoteModule. Are any of these properties not allowed to work together? Or is this the Electron version deprecating some of them? How can I fix the error

over 4 years ago · Santiago Trujillo
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