I am trying to build a web-desktop application using ElectronJs and AngularJS, so I wrote my code and everything worked fine when I start my desktop application, but in the browser, I have a problem - I have an undefined method.
Here is the line where I am having a problem :
const electron = require('electron')
Everything works fine as I said when I tap my command :
electron .
But when I open my file index.html in my browser I get this error in my console
ReferenceError: require is not defined
I tried some solutions like importing 'require.js' but nothing is working.
<script src="require.js"></script>
But I get another error which is :
Error: Module name "electron" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded