Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-8

Not able to install the couchnode library from npm - seems to be a node.gyp issue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:
      Mac OsX 10.7.5, Macbook Air

      Description

      I am having trouble installing couchbase module from npm. I see permission issues in the npm console log even if i am doing "sudo install couchbase". I did install libcouchbase via brew and did not get error messages (I think). I have installed multiple other npm modules (some with c-code with no issues).

      Please let me know if this is not the correct channel to post issues like this one (I just thought as the module was so young all feedback is good). Also, at this time this stops me from piloting couchbase

      I have attached the npm error log

      1. npm-debug.log
        51 kB
        Hans Kristian Grani
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        trond Trond Norbye added a comment -

        Hi

        It looks like you have node 0.8.8 installed. We are building our plugin with gyp (invoked as node-gyp by npm). It is supposed to be part of your node installation, but I don't remember which version it appeared in. From the log it doesn't look like it can find node-gyp. Could you try a find to see if it is installed (or possibly upgrade). Looks like 0.8.14 is the latest version.

        Show
        trond Trond Norbye added a comment - Hi It looks like you have node 0.8.8 installed. We are building our plugin with gyp (invoked as node-gyp by npm). It is supposed to be part of your node installation, but I don't remember which version it appeared in. From the log it doesn't look like it can find node-gyp. Could you try a find to see if it is installed (or possibly upgrade). Looks like 0.8.14 is the latest version.
        Hide
        hkgrani Hans Kristian Grani added a comment -

        Hi Trond. Thanks for getting back to me.

        Sorry for the confusion on node v.8.8. I originally tried to install using node 0.8.16 with the same problem. Going to 0.8.8 was just a test to see if downgrading would help (somewhere in the documentation i think it says that the npm module supports node >= 0.8.8. I retried to use node 0.8.16 with same errors.
        I use https://github.com/visionmedia/n to switch bestween node versions. I installed this/ started using it after I got this problem so it cannot have caused it I think)

        My installed version of node-gyp is 0.8.2 (verified by running "node-gyp -v".

        Below are errors from the console when I run "(sudo) npm install couchbase" (same error both with & without sudo

        There are two items that caught my attention:
        1) the . in "/Users/hanskristian/.node-gyp/0.8.16""
        2) the mix of node-gyp versions : v0.6.3 & v0.8.2

        I am running mac OSX and are not able to tell if this is an error with my setup and/or if thiere may be a bug/ instability in the install/make scripts that may affect other users with previous installations of e.g. node-gyp

        Let me know if you require further info or have any idea on where to troubleshoot

        Hans Kr

        _____ error in console _______

        gyp WARN EACCES user "root" does not have permission to create dev dir "/Users/hanskristian/.node-gyp/0.8.16"
        gyp WARN EACCES attempting to reinstall using temporary dev dir "/Users/hanskristian/node_modules/couchbase/.node-gyp"
        gyp http GET http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
        gyp http 200 http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
        CXX(target) Release/obj.target/couchbase_impl/src/args.o
        ../src/args.cc: In function ‘bool get_string(const v8::Handle<v8::Value>&, char*, size_t)’:
        ../src/args.cc:28: warning: unused variable ‘nw’
        CXX(target) Release/obj.target/couchbase_impl/src/couchbase_impl.o
        CXX(target) Release/obj.target/couchbase_impl/src/namemap.o
        CXX(target) Release/obj.target/couchbase_impl/src/notify.o
        ../src/notify.cc: In function ‘void remove_callback(lcb_st*, const void*, lcb_error_t, const lcb_remove_resp_t*)’:
        ../src/notify.cc:277: error: ‘const struct lcb_remove_resp_t::<anonymous union>::<anonymous>’ has no member named ‘cas’
        make: *** [Release/obj.target/couchbase_impl/src/notify.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:215:23)
        gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
        gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
        gyp ERR! System Darwin 11.4.2
        gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
        gyp ERR! cwd /Users/hanskristian/node_modules/couchbase
        gyp ERR! node -v v0.8.16
        gyp ERR! node-gyp -v v0.6.3
        gyp ERR! not ok
        npm ERR! couchbase@0.0.10 install: `node-gyp rebuild`
        npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
        npm ERR!
        npm ERR! Failed at the couchbase@0.0.10 install script.
        npm ERR! This is most likely a problem with the couchbase package,
        npm ERR! not with npm itself.
        npm ERR! Tell the author that this fails on your system:
        npm ERR! node-gyp rebuild
        npm ERR! You can get their info via:
        npm ERR! npm owner ls couchbase
        npm ERR! There is likely additional logging output above.

        npm ERR! System Darwin 11.4.2
        npm ERR! command "node" "/usr/local/bin/npm" "install" "couchbase"
        npm ERR! cwd /Users/hanskristian/tmp/couchnode
        npm ERR! node -v v0.8.16
        npm ERR! npm -v 1.1.46
        npm ERR! code ELIFECYCLE
        npm ERR!
        npm ERR! Additional logging details can be found in:
        npm ERR! /Users/hanskristian/tmp/couchnode/npm-debug.log
        npm ERR! not ok code 0

        Show
        hkgrani Hans Kristian Grani added a comment - Hi Trond. Thanks for getting back to me. Sorry for the confusion on node v.8.8. I originally tried to install using node 0.8.16 with the same problem. Going to 0.8.8 was just a test to see if downgrading would help (somewhere in the documentation i think it says that the npm module supports node >= 0.8.8. I retried to use node 0.8.16 with same errors. I use https://github.com/visionmedia/n to switch bestween node versions. I installed this/ started using it after I got this problem so it cannot have caused it I think) My installed version of node-gyp is 0.8.2 (verified by running "node-gyp -v". Below are errors from the console when I run "(sudo) npm install couchbase" (same error both with & without sudo There are two items that caught my attention: 1) the . in "/Users/hanskristian/.node-gyp/0.8.16"" 2) the mix of node-gyp versions : v0.6.3 & v0.8.2 I am running mac OSX and are not able to tell if this is an error with my setup and/or if thiere may be a bug/ instability in the install/make scripts that may affect other users with previous installations of e.g. node-gyp Let me know if you require further info or have any idea on where to troubleshoot Hans Kr _____ error in console _______ gyp WARN EACCES user "root" does not have permission to create dev dir "/Users/hanskristian/.node-gyp/0.8.16" gyp WARN EACCES attempting to reinstall using temporary dev dir "/Users/hanskristian/node_modules/couchbase/.node-gyp" gyp http GET http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz gyp http 200 http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz CXX(target) Release/obj.target/couchbase_impl/src/args.o ../src/args.cc: In function ‘bool get_string(const v8::Handle<v8::Value>&, char* , size_t )’: ../src/args.cc:28: warning: unused variable ‘nw’ CXX(target) Release/obj.target/couchbase_impl/src/couchbase_impl.o CXX(target) Release/obj.target/couchbase_impl/src/namemap.o CXX(target) Release/obj.target/couchbase_impl/src/notify.o ../src/notify.cc: In function ‘void remove_callback(lcb_st*, const void*, lcb_error_t, const lcb_remove_resp_t*)’: ../src/notify.cc:277: error: ‘const struct lcb_remove_resp_t::<anonymous union>::<anonymous>’ has no member named ‘cas’ make: *** [Release/obj.target/couchbase_impl/src/notify.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:215:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17) gyp ERR! stack at Process._handle.onexit (child_process.js:678:10) gyp ERR! System Darwin 11.4.2 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/hanskristian/node_modules/couchbase gyp ERR! node -v v0.8.16 gyp ERR! node-gyp -v v0.6.3 gyp ERR! not ok npm ERR! couchbase@0.0.10 install: `node-gyp rebuild` npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 npm ERR! npm ERR! Failed at the couchbase@0.0.10 install script. npm ERR! This is most likely a problem with the couchbase package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls couchbase npm ERR! There is likely additional logging output above. npm ERR! System Darwin 11.4.2 npm ERR! command "node" "/usr/local/bin/npm" "install" "couchbase" npm ERR! cwd /Users/hanskristian/tmp/couchnode npm ERR! node -v v0.8.16 npm ERR! npm -v 1.1.46 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/hanskristian/tmp/couchnode/npm-debug.log npm ERR! not ok code 0
        Hide
        trond Trond Norbye added a comment -

        Hi Hans Kristian!

        The following lines caught my attention:

        CXX(target) Release/obj.target/couchbase_impl/src/notify.o
        ../src/notify.cc: In function ‘void remove_callback(lcb_st*, const void*, lcb_error_t, const lcb_remove_resp_t*)’:
        ../src/notify.cc:277: error: ‘const struct lcb_remove_resp_t::<anonymous union>::<anonymous>’ has no member named ‘cas’
        make: *** [Release/obj.target/couchbase_impl/src/notify.o] Error 1

        I would guess that your installation of libcouchbase is too old (you are using one of the beta-releases of libcouchbase). Unfortunately we had to change the API in the last minute before releasing libcouchbase 2.0 in order for people to monitor deletions.

        Please ping me on trond.norbye@gmail.com (or in #libcouchbase on irc.freenode.net) and we'll resolve this.

        Cheers,

        trond

        Show
        trond Trond Norbye added a comment - Hi Hans Kristian! The following lines caught my attention: CXX(target) Release/obj.target/couchbase_impl/src/notify.o ../src/notify.cc: In function ‘void remove_callback(lcb_st*, const void*, lcb_error_t, const lcb_remove_resp_t*)’: ../src/notify.cc:277: error: ‘const struct lcb_remove_resp_t::<anonymous union>::<anonymous>’ has no member named ‘cas’ make: *** [Release/obj.target/couchbase_impl/src/notify.o] Error 1 I would guess that your installation of libcouchbase is too old (you are using one of the beta-releases of libcouchbase). Unfortunately we had to change the API in the last minute before releasing libcouchbase 2.0 in order for people to monitor deletions. Please ping me on trond.norbye@gmail.com (or in #libcouchbase on irc.freenode.net) and we'll resolve this. Cheers, trond
        Hide
        hkgrani Hans Kristian Grani added a comment -

        Issue seems to be fixed. Thanks to Trond and the community for great help on IRC.

        It seemed that my issue was due to a combination of outdated versions of both homebrew and libcouchbase (libcouchbase would not install correctly with my version og homebrew I think). My fix was :
        brew uninstall libcouchbase
        brew update
        brew upgrade
        brew install https://github.com/couchbase/homebrew/raw/preview/Library/Formula/libcouchbase.rb
        npm insstall couchbase

        I then get the npm package installed without warnings. Have not verified the installation yet but at least this issue is solved so the ticket can be closed.

        Thanks for the help!

        Hans Kr

        Show
        hkgrani Hans Kristian Grani added a comment - Issue seems to be fixed. Thanks to Trond and the community for great help on IRC. It seemed that my issue was due to a combination of outdated versions of both homebrew and libcouchbase (libcouchbase would not install correctly with my version og homebrew I think). My fix was : brew uninstall libcouchbase brew update brew upgrade brew install https://github.com/couchbase/homebrew/raw/preview/Library/Formula/libcouchbase.rb npm insstall couchbase I then get the npm package installed without warnings. Have not verified the installation yet but at least this issue is solved so the ticket can be closed. Thanks for the help! Hans Kr

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            hkgrani Hans Kristian Grani
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes