fs module fails when integrating Electron into Angular project
I have some trouble integrating Electron. When I use it as described in this blog post , everything works. Problems start when I want to use import Electron (electron.remote) to use it in Angular2 service to let the app using the desktop features like system dialogs and file system access. I get the following error when loading the app, in electron/index.js which is included in webpack bundle: Uncaught TypeError: fs.existsSync is not a function (index.js:6) The file looks quite simple: var fs = require('fs') var path = require('path') var pathFile = path.join(__dirname, 'path.txt') if (fs