Skip to content

Unnecessary redis dependency in jitsu #56

Closed
nicoreed opened this Issue Jul 1, 2011 · 3 comments

3 participants

@nicoreed
nicoreed commented Jul 1, 2011

There is no reason for this dependency. So probably the solution for nconf is to patch like we did for winston for optional dependencies.

An example of the problems this can cause is this error message I was getting yesterday.

nico@pizza:~$ npm install jitsu -g

> hiredis@0.1.12 preinstall /usr/local/lib/node_modules/jitsu/node_modules/nconf/node_modules/redis/node_modules/hiredis
> make || gmake

cd deps/hiredis && make static
make[1]: Entering directory `/usr/local/lib/node_modules/jitsu/node_modules/nconf/node_modules/redis/node_modules/hiredis/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
ar: libhiredis.a: File format not recognized
make[1]: *** [libhiredis.a] Error 1
make[1]: Leaving directory `/usr/local/lib/node_modules/jitsu/node_modules/nconf/node_modules/redis/node_modules/hiredis/deps/hiredis'
make: *** [all] Error 2
sh: gmake: not found
npm ERR! error installing redis@0.6.2 Error: hiredis@0.1.12 preinstall: `make || gmake`
npm ERR! error installing redis@0.6.2 `sh "-c" "make || gmake"` failed with 127
npm ERR! error installing redis@0.6.2     at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing redis@0.6.2     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing redis@0.6.2     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! error installing nconf@0.1.14 Error: hiredis@0.1.12 preinstall: `make || gmake`
npm ERR! error installing nconf@0.1.14 `sh "-c" "make || gmake"` failed with 127
npm ERR! error installing nconf@0.1.14     at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing nconf@0.1.14     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing nconf@0.1.14     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! error installing jitsu@0.3.8 Error: hiredis@0.1.12 preinstall: `make || gmake`
npm ERR! error installing jitsu@0.3.8 `sh "-c" "make || gmake"` failed with 127
npm ERR! error installing jitsu@0.3.8     at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing jitsu@0.3.8     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing jitsu@0.3.8     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! hiredis@0.1.12 preinstall: `make || gmake`
npm ERR! `sh "-c" "make || gmake"` failed with 127
npm ERR! 
npm ERR! Failed at the hiredis@0.1.12 preinstall script.
npm ERR! This is most likely a problem with the hiredis package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make || gmake
npm ERR! You can get their info via:
npm ERR!     npm owner ls hiredis
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "jitsu" "-g"
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/nico/npm-debug.log
npm not ok
@Marak
Marak commented Jul 3, 2011

I feel pretty strongly that we should not have any c addons in jitsu if we don't need them.

Additional deps like this can make the installation brittle.

@indexzero indexzero was assigned Jul 7, 2011
@indexzero
nodejitsu member

I've got this it's an nconf thing

@indexzero
nodejitsu member

This was a problem in nconf@0.1.x where it bundled the Redis storage engine by default. In the same spirit as winston-mongodb and winston-riak I have broken this out into a separate library, nconf-redis.

I updated the dependency in e6aa747 and this issue is now resolved. Other libraries which take the nconf dependency will not be affected because they all have 0.1.x in their package.json

@indexzero indexzero closed this Jul 8, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.