Node.js 和 Couchbase 兼容性

Node.js and Couchbase Compatibility

我正在尝试在 Windows 7 机器上安装用于 Couchbase 的 Node.js SDK。我通过在命令提示符 window 中键入 npm install --save couchbase 来 运行 安装。我的尝试收到了不同的结果。我的结果如下。

安装适用的版本

安装产生多个编译错误的版本

您知道 Couchbase 的 Node SDK 与 Node.js 的哪些版本兼容吗?

在尝试了几种可能的解决方案之后,我已经能够在 Node.js 6.0.0 上安装用于 Couchbase 的 Node.js SDK。我正在分享以下信息,以防其他人遇到同样的问题。这些步骤似乎已经解决了我的问题。

  1. 已卸载 Visual Studio 2012(和 Visual Studio 2015...我尝试使用这两个版本都无济于事)
  2. 重新启动我的电脑
  3. 安装了 Visual Studio 2013 社区版 (https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
  4. 的所有组件(不仅仅是默认组件)
  5. 重新启动我的电脑
  6. 打开命令提示符并确保 NVM 使用 Node.js 6.0.0(例如 nvm use 6.0.0nvm install 6.0.0
  7. 从命令提示符,全局安装node-gyp (npm install –g node-gyp)(参考:https://github.com/nodejs/node-gyp
  8. 从命令提示符,运行 npm config set msvs_version=2013
  9. 在命令提示符下,运行 npm config get msvs_version 确认我通过在上一步中设置的值得到了 2013
  10. 在命令提示符下,运行 npm config set python <path_to_the_python_executable> 例如npm config set c:\Python27\python.exe
  11. 运行 npm config get python 确认我得到了我在上一步输入的值
  12. 从命令提示符,运行 npm install couchbase

Couchbase 论坛 this thread 中提供了一些其他信息。