I'm using electron and react, the react app was created with the create-react-app boilerplate. I need to use the electron API to open an external link, but this task is achieve from a react component. I imported the remote electron inside the react component(in order to get access to the current window.) but that gave me an error
const {remote} = require("electron")
The error is raised from electron itself, from node_modules/electron/index.js and the problem is with fs module, it says:
TypeError: fs.existsSync is not a function
This error is showed in the electron windows.