I am using React + Electron + Webpack to create an application, but while trying to use Electron modules, i am getting the error stating "Cannot find module 'electron'.
I have the below sample code in one of my React components :-
const shell = window.require("electron").shell;
shell.showItemInFolder("C:\\Logs");
I have referred many of the issues which were raised in SO related to webpack & Electron, but none of the solutions seem to work for me.
When i try the below code :-
require('electron-prebuilt')
It returns me back the path to the electron executable.