Couchnode installation on windows

Not sure if this question goes anywhere, totally confused on how this "community" thing works. But if this gets seen...

Anyone having problems with compilation errors when doing:

npm install couchbase

with c:couchbase containing the latest libcouchbase?

I am getting the following and would really appreciate some pointers:

c:\couchbase>npm install couchbase
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@0.1.0 install c:\couchbase\node_modules\couchbase
> node-gyp rebuild

c:\couchbase\node_modules\couchbase>node "E:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gy
p.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Copying C:/couchbase/bin/libcouchbase.dll to c:\couchbase\node_modules\couchbase/build/Release/libcouchbase.dll
1 file(s) copied.
valueformat.cc
constants.cc
cas.cc
options.cc
c:\couchbase\node_modules\couchbase\src\namemap.h(51): error C2059: syntax error : 'constant' (..\src\cas.cc) [c:\couchbase\node_modules\co
uchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(51): error C3805: 'constant': unexpected token, expected either '}' or a ',' (..\src\cas.
cc) [c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(79): error C2065: 'MAX' : undeclared identifier (..\src\cas.cc) [c:\couchbase\node_module
s\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2589: 'constant' : illegal token on right side of '::' (..\src\cas.cc) [c:\cou
chbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(51): error C2059: syntax error : 'constant' (..\src\constants.cc) [c:\couchbase\node_modu
les\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(51): error C2059: syntax error : 'constant' (..\src\valueformat.cc) [c:\couchbase\node_mo
dules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2143: syntax error : missing ')' before '::' (..\src\cas.cc) [c:\couchbase\nod
e_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(51): error C3805: 'constant': unexpected token, expected either '}' or a ',' (..\src\cons
tants.cc) [c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(51): error C3805: 'constant': unexpected token, expected either '}' or a ',' (..\src\valu
eformat.cc) [c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2660: 'Couchnode::ResponseInfo::setField' : function does not take 0 arguments
(..\src\cas.cc) [c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(79): error C2065: 'MAX' : undeclared identifier (..\src\constants.cc) [c:\couchbase\node_
modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(79): error C2065: 'MAX' : undeclared identifier (..\src\valueformat.cc) [c:\couchbase\nod
e_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2059: syntax error : ')' (..\src\cas.cc) [c:\couchbase\node_modules\couchbase\
build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2589: 'constant' : illegal token on right side of '::' (..\src\valueformat.cc)
[c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2589: 'constant' : illegal token on right side of '::' (..\src\constants.cc) [
c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2143: syntax error : missing ')' before '::' (..\src\valueformat.cc) [c:\couch
base\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\cookie.h(55): error C2143: syntax error : missing ')' before '::' (..\src\constants.cc) [c:\couchba
se\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\commandoptions.h(50): error C2039: 'GET_RAW' : is not a member of 'Couchnode::NameMap' (..\src\cas.
cc) [c:\couchbase\node_modules\couchbase\build\couchbase_impl.vcxproj]
c:\couchbase\node_modules\couchbase\src\namemap.h(27) : see declaration of 'Couchnode::NameMap'
...

2 Answers

« Back to question.

Hey enko,

Please try to build your couchnode directly from our GitHub repository, I have put an example of how to do that below. Windows builds are not yet fully supported, and there was a minor issue in our 0.1.0 release that specifically impacted windows builds which has since been fixed.

shell> npm install git+https://github.com/couchbase/couchnode.git

Cheers, Brett

that worked brett, thank you very much. And thanks for maintaining this awesome lib.

« Back to question.

Hello,

Have you tried with the following steps:
http://tugdualgrall.blogspot.fr/2013/01/getting-started-with-couchbase-a...

Note: I have not yet tested the latest CouchNode release)

Regards
Tug
@tgrall

tgrall,
I've installed latest: node, node-gyp, python and I have vs2012 installed. Tried putting all releases of libcouchbase into c:\couchbase.
I've used that guide before with success (its in fact running fine right now on previous release), not this time.

Hmm ok, will test the latest on Windows.... and let you know