Using Nodejs native modules (fs, http) with electron


Hi, I have recently started working on electron. I am working on an app to download file from url. For that, I am using native nodejs modules - fs, http. But It is not working with error – ReferenceError: require is not defined. Any examples using node modules fs, http are welcome.


If you disable node integration then require will not be available.