I recently upgraded to electron v1.3 from 0.37 and get Cannot find module 'remote' in the renderer process.
Been combing through the docs and haven't been able to come up with much
here's a part of my code
RENDERER JS FILE
var remote = require('electron').remote;
const ipcRenderer = require('electron').ipcRenderer;
const session = remote.require('electron').session; //i'm trying to use the session module here
var app = remote.require('electron').app; //and here too
MAIN JS PROCESS
const {app} = require('electron')
var fs = require('fs');
const {ipcMain} = require('electron')
const {BrowserWindow} = require('electron')
const {session} = require('electron')
const {dialog} = require('electron')
Try with this code
const app = require('electron').remote.app
And in your Main process you can do this :
const {app, ipcMain, BrowserWindow, session, dialog} = require('electron')
var fs = require('fs');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With