I am hosting a web-app in electron.exe, and am trying to send an IPC message from the renderer process to the main process, per code below:
var ipc = require('ipc'); ipc.send('close-main-window');
Problem is the “require(‘ipc’)” call always returns “undefined”.
I tried installing the IPC module (see cmd-line below), but that didn’t help:
C:>npm install ipc
└── firstname.lastname@example.org (email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org,email@example.com)
I am new to the whole concept of Electron/Atom-shell, and probably am misunderstanding something very fundamental. Or maybe my paths are all messed up, due to my renderer script coming from a web-server, instead of being stored locally with the application.
Any help would be greatly appreciated!