当我尝试使用npm install -g appium安装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如果我再次运行安装程序,我会得到
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。
发布于 2020-11-24 12:05:25
我能够通过安装NPM 6(在撰写本文时安装6.14.9)来解决这个问题。
npm i -g npm@6
npm i -g appium如果您想锁定npm的特定版本,而不是最新版本,那么这应该会将您带到应该安装它的版本。
npm i -g npm@6.14.9发布于 2020-12-04 23:11:30
authorize-ios已弃用。appium authorize-ios
移除appium、更新npm、清除缓存并通过npm重新安装appium对我们解决这个问题起到了很好的作用(通过这种方式成功更新了4个构建代理)。
npm uninstall -g appium && npm install -g npm && npm clean cache --force && npm install -g appium发布于 2020-11-05 20:58:45
这看起来像是权限问题,我建议你从头再试一次:
安装appium-doctor来检查您的系统是否为Appium:npm install -g appium-doctor正确设置了所有内容也是有意义的。
您可以查看详细的设置here
https://stackoverflow.com/questions/64655932
复制相似问题