How do I get the node request module to work in electron


I installed the request module into my webscrape project but I can’t get it to work the way it works in nodejs.This file is called in another file with the “var scrape = require (’./scrape.js’)” and call back. It works I tested it. Where it does not work is at the request(URL, function(error, response, html) anything at or after this line does nothing. I don’t understand enough about electron to fix this could someone please give me some directions.

Here is the code for the file.

 function scrape(callback){  
 var content = [];
 var request = require('request');
 var URL = '';

 request(URL, function(error, response, html){
   if (error){
       content.push(console.log('Error:', error));
   if (response.statusCode !== 200) {
       content.push(console.log('Invalid Status Code Returned:', response.statusCode));

 module.exports = scrape;