Skip to main content

All Questions

Tagged with
4 votes
1 answer
119 views

Error packaging electron app that uses local files

I created an App using electron that interacts with local files using IPC. When i run it using npm start, éverything works as excpected, but when i try to package the app into an .exe file using the ...
MabMab's user avatar
  • 43
0 votes
0 answers
23 views

Reset all the settings of an Electron-based app

My Electron app has a menu to Reset All of its settings. I do this by calling fs.rmSync(app.getPath('userData'), { recursive: true }) and it's working fine when it comes to, for instance, the position ...
Alan Garny's user avatar
0 votes
1 answer
52 views

fs.watch doesn't return an FSWatcher instance in Electron

I have an Electron React App Where I'm trying to call .close() on the object that I assigned an fs.watch to. But I think Vite, Electron or something is wrapping something around the object returned ...
Fluxian's user avatar
  • 913
1 vote
1 answer
77 views

Convert file of consts to string and save it in fs

I'm newbie with electronjs so i tried to save my file as a TXT file via fs like this: simple consts in data.ts file: export const users = [{ id: 1, name: 'a', classId: 1 }] export const classes = [ ...
Morteza Mazrae's user avatar
0 votes
0 answers
67 views

How to read a file from url with Node.js and Electron

How can I read a file with nodejs, even json, from url? My file is on a server. I tried with ftp download but it is very inefficient. Now is working on this, but is very slow for download and running.....
Alexie01's user avatar
  • 141
1 vote
1 answer
648 views

How to get node fs to work in an Angular and Electron application

" The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this ...
Michael Vaughn's user avatar
1 vote
0 answers
33 views

Detecting File Closure After Saving in Electron with Chokidar

Here is the code snippet ipcMain.handle("open-dialog", async (event: Electron.IpcMainInvokeEvent) => { let filePaths = await dialog.showOpenDialog({ properties: ["...
Balaji's user avatar
  • 21
0 votes
2 answers
92 views

Why does my 'if' statement only work on the second trigger of the function?

Using Node JS, Electron and the FS module I have created a function within a seperate .js file that is called into my HTML as a script and triggered from a button with onclick="ReadSerials()"...
CB700's user avatar
  • 23
1 vote
1 answer
1k views

"Error. EPERM: operation not permitted, stat" Electron application

I'm getting the below error when getting files from the path on the client's machine: I've function in my electron main process in which all the files are read from the path and uploaded to the ...
Faizan Saiyed's user avatar
0 votes
1 answer
166 views

nodejs fs.rm(path, { recursive: true, force: true }) throws "ENOTEMPTY: directory not empty"

import { existsSync } from "fs"; import fs from "fs/promises"; export async function makeFolder(path: string) { if (existsSync(path)) { try { await fs.rm(path, { recursive: true, ...
Andrei Ranta's user avatar
0 votes
1 answer
81 views

Js file becomes non-functional as soon as I require ipcRenderer

I was testing the ipcRenderer process for my project and I got to a point where, in my javascript file, I require ipcRenderer: const { ipcRenderer } = require('electron') In my HTML file, I have ...
Ash Babayan's user avatar
0 votes
0 answers
290 views

TypeError: Cannot read properties of undefined (reading 'readFile')

I am learning how to create an Electron react app and i want to use fs.readFileSync() in a renderer file (i'm trying to get it to work with the amazon rekognition api). I used contextBridge and ...
quah joey's user avatar
0 votes
1 answer
94 views

Why boolean returns undefined in Electron?

I want to print whether file exists or not in boolean but it keeps returning undefined in renderer.js. I use fs module with promises and I want to make this code print only true or false. main.js ...
gloomn's user avatar
  • 13
0 votes
0 answers
204 views

Electron app restarts automatically after calling fs.writeFile method

I have a problem with my electron app. I'm writing an app that creates CV's using data that user entered to it. I don't know how to prevent automatically restart after calling a fs.writeFile method. ...
sanholo's user avatar
  • 11
0 votes
1 answer
86 views

Node fs opendir does not work with electron

I am using Electron and Node fs. I want to open a directory, but the directory does not open when fs.opendir is called. Other fs methods in the same file work as intented. My code: const fs = require('...
Franco's user avatar
  • 882

15 30 50 per page
1
2 3 4 5
9