node.js - nodejs couchbase安装失败

标签 node.js npm installation couchbase node-gyp

我已经安装了多个软件包,如 Express、Joi、Fastify,没有任何问题。但是当我尝试使用 npm 安装 couchbase 包时,它总是失败。请在日志下方找到。

> couchbase@2.6.10 install C:\Users\JInbaraj\Documents\VSCode_Projects\Node-js\Express\node_modules\couchbase
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.14.1 runtime=node arch=x64 libc= platform=win32)

C:\Users\JInbaraj\Documents\VSCode_Projects\Node-js\Express\node_modules\couchbase>if not defined npm_config_node_gyp (node "D:\node-v12.14.1-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "D:\node-v12.14.1-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:81:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "D:\\node-v12.14.1-win-x64\\node.exe" "D:\\node-v12.14.1-win-x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\JInbaraj\Documents\VSCode_Projects\Node-js\Express\node_modules\couchbase
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN Express@1.0.0 No description
npm WARN Express@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! couchbase@2.6.10 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the couchbase@2.6.10 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\JInbaraj\AppData\Roaming\npm-cache\_logs\2020-01-14T10_42_00_899Z-debug.log

我正在使用稳定的 Node JS 版本。我尝试重新安装 Node JS。我尝试重新安装 Python 2.7、Windows build-essentials,并在引用此 link 后尝试了 Visual Studio 2015 工具,但一切都是徒劳。

有什么建议吗?

最佳答案

问题终于解决了!

Visual studio 构建工具在使用npm命令安装时显示已成功安装(我什至尝试使用npm安装多次)。后来,我使用Visual studio安装程序并选择Visual studio build tools 2017来验证安装。为了验证安装,我尝试了“修复”选项,令我惊讶的是,它只是部分下载,然后从那里恢复。等待一段时间才能完成下载和安装。然后重新启动电脑并尝试npm i couchbase...成功了!

关于node.js - nodejs couchbase安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59732301/

相关文章:

node.js - 两个nodejs应用程序之间的通信

javascript - 下载 XML 源时处理多种编码方案

javascript - JavaScript 中的赋值和 var 关键字

node.js - 如何等待请求响应并返回值?

node.js - 为什么 "npm install"删除了node_modules中的所有包?

browser - 在 Inno Setup 中嵌入 Internet Explorer 窗口(Web 浏览器控件)

android - 如何热部署android项目?

node.js - 如何使用 Peer.js 向特定对等方发送通知

node.js - 无法在 RHEL 上安装 yarn

windows - 使用 GUI 免费安装系统