【问题标题】:binding.gyp not found (cwd: \node_modules\appium\node_modules\heapdump) while trying to load binding.gyp尝试加载 binding.gyp 时找不到 binding.gyp (cwd: \node_modules\appium\node_modules\heapdump)
【发布时间】:2018-05-14 10:20:00
【问题描述】:

我正在尝试使用 npm 命令安装 appium。

每次尝试都会出错。

在最后一次尝试中,我参考了以下链接:

node-gyp build error windows x64

所以要在我的 windows 10 64 位机器上安装 appium,我按照以下步骤操作:

npm install --global --production windows-build-tools

npm config set msvs_version 2013 --global

npm install -g node-gyp-install

npm install appium

报错如下:

C:\WINDOWS\system32\node_modules\appium\node_modules\heapdump>如果没有 定义 npm_config_node_gyp (节点 "C:\Program 文件\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" 重建 ) 否则 (节点 "" 重建 ) gyp: binding.gyp not found (cwd: C:\WINDOWS\system32\node_modules\appium\node_modules\heapdump) 而 试图加载 binding.gyp gyp ERR!配置错误gyp ERR!堆 错误:gyp 失败,退出代码:1 gyp ERR!堆栈在 ChildProcess.onCpExit (C:\Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16) 吉普错误!堆栈在 emitTwo (events.js:106:13) gyp ERR!堆栈在 ChildProcess.emit (events.js:191:7) 错误错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 吉普错误!系统 Windows_NT 10.0.15063 gyp 错误!命令“C:\程序 文件\nodejs\node.exe" "C:\Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" “重建” gyp ERR! cwd C:\WINDOWS\system32\node_modules\appium\node_modules\heapdump gyp 错误! 节点 -v v6.11.0 gyp 错误!节点-gyp -v v3.4.0 gyp 错误!不好 C:\WINDOWS\system32 `--appium@1.7.1

appium 的唯一问题在于它的复杂配置。

如果有人有在 Windows 中安装 appium 的工作步骤,请分享。真的很有帮助

任何建议将不胜感激

【问题讨论】:

  • 你安装了 Python 2 吗? node-gyp 需要它。当我升级 npm 时,我 had similar problems 不久前。还有,你说你安装了node-gyp-install,你也安装了node-gyp吗?
  • 是的,我的系统中安装了 python 2.7.9。在使用“npm install --global --production windows-build-tools”时再次安装它

标签: node.js npm appium node-modules appium-android


【解决方案1】:

我错过了 appium 安装的全局标签

npm install -g appium

所以按以下步骤安装:

npm install --global --production windows-build-tools

npm config set msvs_version 2013 --global

npm install -g node-gyp-install

npm install -g node-gyp

npm install -g appium

【讨论】:

  • 全局安装 node-gyp 并且所有有罪的包都解决了我的问题
猜你喜欢
  • 2022-12-16
  • 1970-01-01
  • 2016-09-29
  • 2020-01-05
  • 1970-01-01
  • 1970-01-01
  • 2021-03-30
  • 2018-05-23
  • 1970-01-01
相关资源
最近更新 更多