Tuesday, 6 June 2017

Electron : require() is not defined

I'm creating an electron app for my own purpose.What the problem is

when I'm using node function's inside my an HTML page then it throws an

error 'require()' is not defined.Here is my Question.

Is there any way to use node js functionalities in all my HTML pages ?

If it is possible please give an example how to do this or provide a link.

What are the variables I'm trying to use my Html page are Given below

  var app = require('electron').remote; 
  var dialog = app.dialog;
  var fs = require('fs');

These are the values I'm using all my Html windows in Electron.

Anyone help me to do this.And I'm a beginner of this.



via Mari Selvan

No comments:

Post a Comment