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

679
Views
unable to load preload script in Electron but the absolute path is correct

In an Electron-Typescript-React-Webpack app I'm trying to keep contextIsolation: true and use preload.

In electronjs.org docs I read : "preload String (optional) - Specifies a script that will be loaded before other scripts run in the page. This script will always have access to node APIs no matter whether node integration is turned on or off. The value should be the absolute file path to the script. " .

With preload: path.join(__dirname, './preload/preload.ts'),
I get : unable to load preload script: /home/marco/webMatters/electronMatters/electron-react-boilerplate/src/preload/preload.ts .

enter image description here

But this is the actual absolute path to preload.ts :

(base) marco@pc01:~/webMatters/electronMatters/electron-react-boilerplate/src/preload$ ls -lah
total 12K
drwxr-xr-x 2 marco marco 4,0K feb 12 11:52 .
drwxr-xr-x 5 marco marco 4,0K feb 12 11:54 ..
-rw-r--r-- 1 marco marco 1,7K feb 12 11:20 preload.ts
  • node: v14.5.0
  • electron: v11.0.1
  • O.S.: Ubuntu 18.04.4 Desktop

Any suggestions?

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