Hi,
in my NativeScript application I need the following Node module: https://github.com/malko/node-promised-redmine
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: "my.host.com", // 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 (https://nodejs.org/api/https.html#https_https)