Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!