[URGENT] Node.JS not working properly

Support
  • // Please help! Need to enable node.js and install request module for this example.
    var request = require('request');
    request('http://www.google.com', function (error, response, body) {
    console.log('error:', error); // Print the error if one occurred
    console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
    console.log('body:', body); // Print the HTML for the Google homepage.
    });

    Some other module work but when I try this I get no output in BAS, works from node.js in command prompt. request module is installed in BAS as well as node.js installation from official source.

  • @HELP_ME use await

    await(new Promise((resolve, reject) => {
        const request = require('request');
    
        request('https://community.bablosoft.com', function (err, res, body) {
            console.log(body);
            resolve()
        });
    }));
    

  • Send mail function not working

    Support
    0 Votes
    1 Posts
    391 Views
  • 0 Votes
    2 Posts
    422 Views
  • Spotify works with

    Support
    1 Votes
    5 Posts
    1049 Views
  • 0 Votes
    2 Posts
    624 Views
  • Button click doesn't work

    Support
    0 Votes
    10 Posts
    2659 Views