fs.existsSync is not a function
See original GitHub issueDescribe the bug
I’m getting fs.existsSync is not a function
when I’m importing electron in my component.
This is similar to #335 but the solution is not working for me.
To Reproduce
import { remote } from 'electron';
const { app } = remote
export default {
name: 'Home',
methods: {
restartApp() {
app.relaunch();
app.exit()l
}
}
}
Expected behavior I should be able to relaunch the app by accessing the methods in my component.
Screenshots
Environment (please complete the following information):
- OS and version: Mac OSX 10.14.5
- node version: 12.7.0
- npm version: 6.10.0
- yarn version (if used):
- vue-cli-plugin-electron-builder version : 1.2.0
- electron version: 6.0.10
- other vue plugins used:
- custom config for vcp-electron-builder:
- (if possible) link to your repo:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:15 (4 by maintainers)
Top Results From Across the Web
How to resolve fs.existsSync is not a function - node.js
I was facing the same Error like TypeError: fs.existsSync is not a function. enter image description here. So, I figured out that one...
Read more >TypeError: fs.existsSync is not a function · Issue #7 - GitHub
Open any React file, e.g. App.tsx; Try to import anything electron related. import { ipcRenderer } from "electron"; const App: React.FC = ()...
Read more >TypeError: fs.existsSync is not a function - DEV Community
While using Sass in a react project and using useRef hook, one might come across this error: React and Sass error.
Read more >Node.js fs.existsSync() Method - GeeksforGeeks
The fs.existsSync() method is used to synchronously check if a file already exists in the given path or not. It returns a boolean...
Read more >How to solve: TypeError: fs.existsSync is not a function - Reddit
VS Code and me somehow managed to import "render" from node-sass into one of them... I guess reading your own code helps a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
for me helped:
I’m facing the same error i.e fs.existsSync is not a function. I’ve tried everything and doesn’t work for me. I’ve got this error while importing or requiring the electron in vue component. Please help. @nklayman
Still I get the same error. What else I’ll do to get rid of this error.