use fs-extra at electron render process
npm install electron-fs-extrajs
import fs from 'electron-fs-extra';async readFile(filePath) {
return await fs.readFile(filePath)
}
readFile(filePath);
`Note
must install fs-extra first at project
`bash
$ yarn add fs-extraor
$ npm install fs-extra -S
``