I am creating an electronic application and am currently using a browser for rendering files (web pages), like any other javascript frontend. I would also like to use the browser function to link the main process files. However, browswerify cannot find the electron embedded in modules such as the clipboard, ipc, browser window, application, etc.
In my main.js file, which serves as an entry point for an electronic application. I have:
const ipc = require('ipc'); const clipboard = require('clipboard'); const BrowserWindow = require('browser-window'); const app = require('app'); const yargs = require('yargs');
const yargs loads exactly like in the node_modeuls folder, and the browser can enable this. However, these four elements cannot be found using the browser and, consequently, the assembly fails.
[11:49:17] Finished 'development' after 17 ms Error: Cannot find module 'ipc' from '<path>' Error: Cannot find module 'clipboard' from '<path>' Error: Cannot find module 'browser-window' from '<path>' Error: Cannot find module 'app' from '<path>'
Any suggestions?
source share