I'd like to use this xml parser but there's absolutely no information on how to install it. It doesn't seem available on npm, and I haven't come across any good instructions through google.
I'm on Debian 5 Lenny, and relatively new to node.js. Someone mentioned to append the NODE_PATH environment variable, but I'm not sure how I should structure it, in terms of choosing WHERE to store my node binaries.
Can someone provide a full example demonstration of setting it up? Including git cloneing if necessary.
PS - I'd like multiple users to use these modules so I don't just want to put this in ~ for myself.
OK, what you need to do is the following
/etc/bash.bashrcexport NODE_PATH="/usr/local/lib/node" to the end of the fileNote: If you edit the file with a graphical program always use gksudo instead of sudo otherwise you may end up with files that are not root's being owned by root
Now Node will search for modules in /usr/local/lib/node (create it if it doesn't exist, also you need to start a new bash since bashrc is only read on start), next step is to put the stuff there.
o3-fastxml folder from node-o3-fastxml/lib into /usr/local/lib/node, so that you have a /usr/local/lib/node/o3-fastxml folderLast step, require the module in Node and check whether everything is working:
require('o3-fastxml') //magic! Gnah, Node will find the folder o3-fastxml on the path and will then find the index.js inside the folder
That should be all that's needed, if I'm not mistaken :)
Just leave a comment if it doesn't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With