Search code examples
node.jsmeteorrrdtoolrrd

How to install node_rrd correctly?


If I ask this here it's because I'm using MeteorJS and I need to use RRD. I founded a node_rrd that do all I need to do right here.

The problem is that I have installed all these things in my terminal:

 brew install rrdtool  
 meteor npm install rrd  
 meteor npm install rrdtool
 meteor npm install node-rrdtool

I did the following install to because in dependencies they say that I need to do :

 meteor npm install -g node-gyp

And when I do a console.log(rrd)I have this:

 { RRD: { [Function: RRD] restore: [Function] } }

But when I want to create the file as in the basic usage I have an errro rrd.create is not a function

So my question is someone here has already worked with RRD on nodeJS ? Or Someone know how to install node_rrd ?


Solution

  • If you read the instructions for RRD on the github page you will see this:

    Using git

    $ git clone <this repository>
    $ cd node_rrd
    $ npm install .
    

    Basically you need to download the repo to your local machine and build it. You are on the right track with setting up gyp, but don't use meteor npm for that, it needs to be global for your computer, so do this:

    sudo npm install -g node-gyp
    

    The sudo is optional I think if you are on Windows. Let me know if you need more help