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

127
Views
How can I get open/save dialog to work on Electron v19?

I am quite new to Electron and am trying to make a note app where you can save and open note files. I am trying to set up a page where you can open a file. I have been following a few tutorials, but none of them seem to be working. I try:

const { dialog, app } = require('electron')

dialog.showOpenDialogSync(mainWindow, {
  properties: ['openFile', 'openDirectory']
})

and my html is:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Test</title>
    <script src="app.js"></script>
  </head>
  <body>
    <h1>Test</h1>
      
  </body>
</html>

but I get this error in console:

Uncaught TypeError: Cannot read properties of undefined (reading 'showOpenDialogSync')
    at app.js:3:8
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!