Could not find module 'https'

Thread is closed for posting
1 posts, 0 answers
  1. Manuele
    Manuele avatar
    1 posts
    Member since:
    May 2017

    Posted 22 May 2017 Link to this post


    in my NativeScript application I need the following Node module:

    So I installed it (with npm install --save promised-redmine) and tried in the HelloWorld application. I putted the following snipped in my main-page.js:

    var Redmine = require('promised-redmine');
    var config = {
    host: "", // required
    apiKey: "_mykey_", // required
    pathPrefix: "/",
    protocol: "http"
    var redmineApi = new Redmine(config);
    redmineApi.getProjects().success(function (projects) {console.log(projects)});

    When I run the application I get the following error:

    file:///app/tns_modules/promised-redmine/./lib/redmine.js:4:19: JS ERROR Error: Could not find module 'https'.

    If I run the same code in an empty Node project it works without issues.

    Why it happens? The https module should be a core Node.js module (


Back to Top