oyiadom oyiadom - 5 months ago 16
Node.js Question

Node.js and Couchbase Compatibility

I am attempting to install the Node.js SDK for Couchbase on a Windows 7 machine. I am running the installation by typing

npm install --save couchbase
into a command prompt window. I have received mixed results from my attempts. My results are below.

Versions for Which the Installation Works Well


  • 0.10.40

  • 0.10.45

  • 0.12.14



Versions for Which the Installation Generates Multiple Compilation Errors


  • 4.0.0

  • 4.3.0

  • 4.4.5

  • 5.6.0

  • 6.2.0



Do you know with which versions of Node.js the Node SDK for Couchbase is compatible?

Answer

After trying several potential solutions, I have been able to get the Node.js SDK for Couchbase to install on my machine over Node.js 6.0.0. I am sharing the information below, in case anyone else is experiencing the same issue. These steps seem to have resolved the problem for me.

  1. Uninstalled Visual Studio 2012 (and Visual Studio 2015...I attempted to use both versions to no avail)
  2. Restarted my computer
  3. Installed all of the components (not just the defaults) for Visual Studio 2013 Community Edition (https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
  4. Restarted my computer
  5. Opened a command prompt and made sure NVM was using Node.js 6.0.0 (e.g. nvm use 6.0.0 or nvm install 6.0.0)
  6. From the command prompt, globally installed node-gyp (npm install –g node-gyp) (Reference: https://github.com/nodejs/node-gyp)
  7. From the command prompt, ran npm config set msvs_version=2013
  8. From the command prompt, ran npm config get msvs_version to confirm that I got 2013 by setting the value in the previous step
  9. From the command prompt, ran npm config set python <path_to_the_python_executable> e.g. npm config set c:\Python27\python.exe
  10. Ran npm config get python to confirm that I got the value I typed in the previous step
  11. From the command prompt, ran npm install couchbase

Some additional information is available in this thread on the Couchbase forum.