0👍
What’s happening is your requiring something like ipc-renderer but that isn’t supported in the browser so you need to check if your running in the browser or not using something like this:
if (window && window.process && window.process.type) {
var ipc = require('ipc-renderer');
}
So if it’s in the browser it won’t require it.
Source:stackexchange.com