I am trying to send messages between JavaScript files. I have a main.js file and have multiple ipc renderer files.
When I use the code below in all of my renderer files
const { ipcRenderer} = require('electron')
I get the error below (just 1 file has no errors when sending message)
TypeError: Cannot read properties of undefined (reading 'send')
How can I solve this and send messages to main.js from multiple JS files ?