When I'm working on my project the my electron window gives this error.
TypeError: fs.existsSync is not a function
getElectronPath
../node_modules/electron/index.js:7
4 | var pathFile = path.join(__dirname, 'path.txt')
5 |
6 | function getElectronPath () {
> 7 | if (fs.existsSync(pathFile)) {
8 | var executablePath = fs.readFileSync(pathFile, 'utf-8')
9 | if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {
10 | return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath)
What should I do?
I used this to create my project.
So I could solve this issue with me & my friend; We reversed my components to earlier version and the problem I saw should be that I used many fetch data operations inside useEffect method.