Why when I run the npm request module the output I get is undefined?
const request = require('request');
request({
url: 'https://maps.googleapis.com/maps/api/geocode/json?address=1301%20lombard%20street%20philadelphia',
json: true
}, (error, response, body) => {
console.log(body);
});
Seems like your code should work properly if request is installed. The possible reason why you get undefined is a problem with your internet connection.
Start with checking if you can access Internet at all. You can try this code: