Try to install coubase node.js fails on OSX 10.9


#1

I’m trying the command to install node.js module couchbase on a OSX 10.9:

npm install couchbase

npm WARN package.json jshint@0.9.1 No repository field. npm WARN package.json recess@1.1.6 No repository field. npm http GET https://registry.npmjs.org/couchbase npm http 304 https://registry.npmjs.org/couchbase npm http GET https://registry.npmjs.org/bindings npm http 304 https://registry.npmjs.org/bindings

couchbase@1.0.1 install /Volumes/1TB/Estudos/node_modules/couchbase
node-gyp rebuild

CXX(target) Release/obj.target/couchbase_impl/src/couchbase_impl.o
In file included from …/src/couchbase_impl.cc:21:
…/src/couchbase_impl.h:64:10: fatal error: ‘libcouchbase/couchbase.h’ file not found
#include <libcouchbase/couchbase.h>
^
1 error generated.
make: *** [Release/obj.target/couchbase_impl/src/couchbase_impl.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /Volumes/1TB/Estudos/node_modules/couchbase
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

I installed the libcouchbase using brew.

Is this a bug?


#2

You should install libcouchbase first

If you are using homebrew, it is as simple as

brew install libcouchbase

Otherwise, download latest tarball and do

./configure && make && sudo make install

#3

I installed libcouchbase.

My problem occurs when i try to install couchbase module.

npm install couchbase

#4

I tried the same steps on a ubuntu machine and was successful.


#5

me too. this is a regression that occurred this morning when I went back to work on the product. It seems like there was an update to the nodejs code or one of its dependencies.

i am on mac osx. i previously could install and run couchbase locally for development. this morning I started getting code 16 network errors and have been slowly building my environment back up… this is the step that’s stuck.

pretty annoying, and please take this report seriously: there is a regression in the nodejs library.


#6

this is a regression, but this github report was a successful workaround for me:


#7

This works for me too. But I don’t know how to install couchnode modules on my node.js app on a different directory?