node.js - 找不到绑定(bind).gyp(cwd :\node_modules\appium\node_modules\heapdump) while trying to load binding. gyp

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

我正在尝试使用 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>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp: binding.gyp not found (cwd: C:\WINDOWS\system32\node_modules\appium\node_modules\heapdump) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\WINDOWS\system32\node_modules\appium\node_modules\heapdump gyp ERR! node -v v6.11.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok C:\WINDOWS\system32 `-- appium@1.7.1

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

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

如有任何建议,我们将不胜感激

enter image description here

最佳答案

我错过了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.js - 找不到绑定(bind).gyp(cwd :\node_modules\appium\node_modules\heapdump) while trying to load binding. gyp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47574273/

相关文章:

ubuntu - 与原生 Windows NPM/Yarn 处理相比,为什么 WSL 非常慢?

node.js - 错误!请求的依赖类型无效 : alias

ios - Appium 无法测试 iOS 应用程序 "The URL '/' did not map to a valid resource"

Appium) 完成设置可选依赖项

json - 记录 JSON 正文可以,但不能记录 body.item。给出未定义的

node.js - 如何在多页 Electron 应用程序中停止 'white' 页面刷新

node.js - Sails 0.9.4,socket.io,新手

node.js - 检测是否有 sudo 正确的信息

node.js - Angular 2如何加载具有子依赖项的第3方供应商 Node 模块

java - 在 Appium 中滑动而不输入 x 和 y 坐标的替代方法?