I would like to use npm talib module within a meteorjs application.
I followed the instruction here and I added this to the packages.json
file:
{
"talib" : "0.6.0"
}
After running meteor
the module talib.node
is there in the node_modules/talib/build/Release/
folder.
Then I wrote the following:
if (Meteor.isServer) {
var Talib = Meteor.npmRequire('talib');
var talib = new Talib();
}
The Talib
object is created and can be logged, like this:
{ version: '0.6.0',
functions:
[ { name: 'ADD',
group: 'Math Operators',
...
}
],
functionUnstIds:
{ TA_FUNC_UNST_ADX: 0,
TA_FUNC_UNST_ADXR: 1,
...
}
}
The line var talib = new Talib()
gives instead this error:
TypeError: object is not a function
What I am doing wrong?