Electron require() is not defined

I’m creating an Electron app for my own purpose. My problem is when I’m using node functions inside my HTML page it throws an error of:

‘require()’ is not defined.

Is there any way to use Node functionalities in all my HTML pages? If it is possible please give me an example of how to do this or provide a link. Here are the variables I’m trying to use in my HTML page:

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

and these are the values I’m using in all my HTML windows within Electron.

92 thoughts on “Electron require() is not defined”

  1. Greаte pieces. Keep writing sսch kinhd off informatіon on your ѕite.
    Im reaⅼly impressed by your site.
    Hi there, You’ve performed a great job. І will certainly digg it and iin my view recommend to mmy frіendѕ.
    I’m confident they’lⅼ be benefited from this site.

    Reply
  2. I am commenting to make you understand of the extraordinary experience our
    girl developed using your site. She came to understand so many pieces,
    which include how it is like to possess an incredible teaching style to have certain people smoothly fully
    grasp specified very confusing subject matter. You really did more than people’s expectations.

    Thank you for coming up with those warm and helpful, trustworthy, educational and also easy tips about that topic to Tanya.

    Here is my homepage forum.adm-tolka.ru

    Reply
  3. I’m just writing to let you be aware of what a terrific experience
    my cousin’s princess enjoyed reading your web page. She even learned several things, which included how
    it is like to have an amazing coaching mood to let many
    more without problems comprehend specified impossible matters.
    You really surpassed readers’ expectations.
    Thank you for giving the important, trusted, informative and in addition easy guidance on the topic to Jane.

    Visit my webpage Zenzi CBD Gummies

    Reply
  4. You are so awesome! I do not think I’ve truly read something like that before.

    So wonderful to discover someone with a few genuine thoughts on this issue.
    Really.. thanks for starting this up. This site is
    one thing that is needed on the web, someone with some originality!

    Reply
  5. It is appropriate time to make a few plans for the long run and it’s time
    to be happy. I have read this publish and if I may just I
    desire to suggest you some fascinating issues or suggestions.

    Perhaps you could write next articles referring to this article.
    I desire to learn more issues approximately it!

    Here is my page: Lacy

    Reply
  6. Wonderful work! That is the kind of info that
    are meant to be shared across the internet. Disgrace on the search engines for
    not positioning this publish higher! Come on over and discuss with my website .

    Thanks =)

    Also visit my blog … Modern Belle

    Reply
  7. It’s the best time to make some plans for the long run and
    it is time to be happy. I have read this submit and if I
    may I want to counsel you few attention-grabbing things or
    advice. Perhaps you could write next articles relating to this article.
    I desire to learn more things approximately it!

    Reply
  8. I was curious if you ever considered changing the layout of your site?

    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it
    better. Youve got an awful lot of text for only having one or 2 pictures.

    Maybe you could space it out better?

    Reply
  9. After I originally left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and
    from now on whenever a comment is added I recieve four emails with the exact same comment.
    There has to be a way you are able to remove me from that service?
    Thank you!

    Reply
  10. Its like you read my mind! You appear to know so much about this, such as you wrote the
    e book in it or something. I think that you just can do with some % to power the message
    house a bit, but other than that, this is magnificent blog.
    An excellent read. I will certainly be back.

    Reply
  11. Hi there, just became alert to your blog through Google, and found that it’s really informative.
    I am gonna watch out for brussels. I will be grateful if you continue this in future.
    Many people will be benefited from your writing.

    Cheers!

    Reply
  12. It’s really a great and helpful piece of information. I am happy that you simply shared this helpful info with us. Please stay us up to date like this. Thanks for sharing.

    Reply
  13. I was just seeking this information for a while.
    After 6 hours of continuous Googleing, finally
    I got it in your website. I wonder what’s the lack of
    Google strategy that don’t rank this kind of informative sites in top of the list.

    Generally the top websites are full of garbage.

    Feel free to visit my website … BioReady Keto

    Reply
  14. obviously like your web site but you have to check the spelling on several of your posts.
    Many of them are rife with spelling problems and I to find it very bothersome to tell the reality on the other hand I’ll
    definitely come back again.

    Check out my web page Rita

    Reply
  15. You really make it appear really easy together with your presentation but I in finding this matter to be really something that I believe I’d by no means understand. It seems too complex and extremely large for me. I’m having a look forward on your subsequent post, I’ll attempt to get the grasp of it!

    Reply
  16. Right here is the right site for anyone who wishes
    to understand this topic. You know so much its almost hard
    to argue with you (not that I really will need
    to…HaHa). You certainly put a fresh spin on a subject that’s been written about for a
    long time. Great stuff, just excellent! scoliosis surgery
    https://0401mm.tumblr.com/ scoliosis surgery

    Reply
  17. I drop a comment whenever I like a post
    on a site or if I have something to valuable to contribute to the discussion. It’s
    caused by the sincerness communicated in the post I looked at.
    And on this post Electron require() is not defined – JavaScript Help.
    I was moved enough to drop a comment 😉 I do have a couple
    of questions for you if it’s allright. Is it only me or do a few of the remarks come across like left by brain dead people?
    😛 And, if you are writing on additional social sites, I’d like to follow everything fresh you have to post.
    Would you make a list every one of all your public pages like your twitter feed, Facebook page or linkedin profile?

    my web site :: belly fat supplements

    Reply

Leave a Comment