Unable to use the Node.js SDK with Node v0.12


#1

I have just updated to Node.js v0.12.0 on my Windows 8.1 x64 machine.
When trying to run an application that is using couchbase, I get the following error message:

Error: Failed to locate couchnode native binding (maybe check builderror.log!)
at Object. (C:\Dev\Test\couchbase-test\node_modules\couchbase\lib\binding.js:152:9)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Dev\Test\couchbase-test\node_modules\couchbase\lib\couchbase.js:3:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)

Is this a known issue?

-Nils Magne


#2

Hey nilsml,

This is indeed a known issue and has been fixed in the repository master. Feel free to install from our repository and on the first Tuesday of next month we will have a release available to fix the issue.

See here: https://issues.couchbase.com/browse/JSCBC-202.

Cheers, Brett


#3

Brett,

I did pull the latest version from GitHub which contains the fix you are referring to, but to no avail.
Maybe the fix only applies to OSX?

-Nils Magne


#4

Hey nilsml,

Now that I think about it, I suspect this is due to the fact that the prebuilt binaries included within the npm package are designed to be used with Node.js 0.10, and you do not have Visual Studio installed to allow it to build a new version for the 0.12 release of Node.js. This is not a problem we have had to deal with in the past as 0.10 has been binary compatible since 0.10.0. You should check out the builderror.log for further details on why the build is failing if you have Visual Studio, otherwise, please look at the node-gyp page for details on how to set up a working build environment on a windows system.

Cheers, Brett


#5

Hello Brett,

I have installed Python in order to build the package, however it looks like the project files require VS2010 build tools. On this machine I only have VS2013. I’d rather not install a lot of old stuff just to be able to build this package. Any chance the prebuilt binaries will be updated in near future?

Cheers,
Nils Magne


#6

Hey Nils,

Keep in mind that Express edition of VS2010 should work as well, and you can install them side-by-side. In regards to updating the prebuilds, I am hoping to be able to do this for our next release on March 3rd, though this may slip as we may need to refactor the code that handles our binding to support prebuilt for both Node 0.10 as well as Node 0.12.

Cheers, Brett


#7

Brett,

I installed all the VS2010, but was still not able to build the package.
Then I discovered the --msvs-version=2013 switch:

npm install "git+https://github.com/couchbase/couchnode.git#master" --msvs-version=2013

Now I was finally able to run the application under Node 0.12 on my Windows machine.

Thanks for your help!

Cheers,
Nils Magne