使用 npm install -g appium 安装 appium 时未找到 .bin/authorize-ios [英] .bin/authorize-ios not found when installing appium using npm install -g appium

查看:44
本文介绍了使用 npm install -g appium 安装 appium 时未找到 .bin/authorize-ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用 npm install -g appium

我收到消息

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/appium/node_modules/.bin/authorize-ios
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/node_modules/.bin/authorize-ios'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

如果我再次运行安装,我会得到

If I run the install again I get

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/appium/build/lib/main.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/build/lib/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

第一个 .bin/authorize-ios 确实不存在.我不知道如何修复它.当我使用 npm install appium-ios-driver 安装时,驱动程序安装在 User/node_modules 而不是 usr/local/lib/node_modules.我使用 brew 安装了 npm.

The first .bin/authorize-ios is indeed not there. I don't know how to fix it. When I install using npm install appium-ios-driver the driver is installed under User/node_modules and not at usr/local/lib/node_modules. I installed npm using brew.

推荐答案

我能够通过安装 NPM 6(在撰写本文时为 6.14.9)来解决这个问题

I was able to solve this by installing the NPM 6 (6.14.9 as of this writing)

npm i -g npm@6
npm i -g appium

如果你想锁定特定版本的 npm 而不是最新版本,那么这应该会让你找到一个应该安装它的版本

If you want to lock into a particular version of npm instead of latest then this should get you to a version that should install it

npm i -g npm@6.14.9

这篇关于使用 npm install -g appium 安装 appium 时未找到 .bin/authorize-ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆