Installing node-compress

12 views
Skip to first unread message

Joran Greef

unread,
Mar 3, 2010, 1:06:26 AM3/3/10
to nodejs
I would like to try out node-compress. The installation instructions:

"node-waf configure
node-waf build"

I tried the following:

1. From node directory: make distclean && ./configure
2. From user directory: git clone ...node-compress && cd node-compress
3. From node-compress directory: node-waf configure && node-waf build
4. From node directory: make && make install

But then, from within my node program: "var compress = require('./
compress')" and "var compress = require('compress')" do not work.

I don't understand the build process, could someone please assist?
Thanks.

Isaac Z. Schlueter

unread,
Mar 3, 2010, 3:37:40 AM3/3/10
to nodejs
Joran,

The thing you need to require() into your program is the
"compress.node" file that gets built.

I recommend doing this in the node-compress folder:
ln -s $(pwd)/compress.node ~/.node_libraries/compress.node

Then, in your program, just do require("compress").

This is exactly why npm is exciting.

--i

Joran Greef

unread,
Mar 3, 2010, 5:55:02 AM3/3/10
to nodejs
Thanks Isaac. That's great.
Reply all
Reply to author
Forward
0 new messages