非常感谢,解决了
MacMini-J:node_modules MacMini_J$ npm install -g iproxy
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/iproxy
npm ERR! path /usr/local/lib/node_modules/iproxy
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/iproxy'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/iproxy'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/iproxy\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/iproxy' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
MacMini-J:node_modules MacMini_J$ sudo npm install -g iproxy
MacMini-J:node_modules MacMini_J$ which iproxy
MacMini-J:node_modules MacMini_J$ iproxy
-bash: iproxy: command not found
碰到了同样的问题,请问楼主后来解决了吗?
iproxy 没有安装。是这样安装吗:
MacMini-J:WebDriverAgent MacMini_J$ sudo cnpm install --global iproxy
Password:
Downloading iproxy to /usr/local/lib/node_modules/iproxy_tmp
Copying /usr/local/lib/node_modules/iproxy_tmp/_iproxy@0.0.4@iproxy to /usr/local/lib/node_modules/iproxy
Installing iproxy's dependencies to /usr/local/lib/node_modules/iproxy/node_modules
[1/1] fresh@~0.2.0 installed at node_modules/_fresh@0.2.4@fresh
All packages installed (1 packages installed from npm registry, used 3s, speed 2.4kB/s, json 1(5.08kB), tarball 2.26kB)
执行完这个之后,再用 which iproxy 看,还是没有结果。
还有这个也试过:
MacMini-J:WebDriverAgent MacMini_J$ sudo npm install --global iproxy
Password:
尝试单独装,在执行 sh 脚本,还是没有解决
MacMini-J:WebDriverAgent MacMini_J$ npm install -g eslint
/usr/local/bin/eslint -> /usr/local/lib/node_modules/eslint/bin/eslint.js
MacMini-J:WebDriverAgent MacMini_J$ npm install -g eslint-plugin-mocha
npm WARN eslint-plugin-mocha@4.12.1 requires a peer of eslint@2.0.0 || 3.0.0 || 4.0.0 but none is installed. You must install peer dependencies yourself.
按照上面的提示执行 npm i eslint-plugin-mocha@latest --save-dev ,又遇到一个坑😢
MacMini-J:WebDriverAgent MacMini_J$ npm i eslint-plugin-mocha@latest --save-dev
npm WARN request-promise-core@1.1.1 requires a peer of request@2.34 but none is installed. You must install peer dependencies yourself.
npm WARN request-promise-core@1.1.1 requires a peer of request@2.34 but none is installed. You must install peer dependencies yourself.
npm WARN request-promise-core@1.1.1 requires a peer of request@2.34 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-mocha@4.12.1 requires a peer of eslint@2.0.0 || 3.0.0 || 4.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! Maximum call stack size exceeded
重新做了一遍,运行 bootstrap 的时候遇到了问题。我按照https://testerhome.com/topics/7192这个帖子的办法试了一下,最终执行结果是这样的。是不是还是有问题啊?
MacMini-J:WebDriverAgent MacMini_J$ sh ./Scripts/bootstrap.sh
-e Fetching dependencies
-e Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN react-dom@15.6.2 requires a peer of react@15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN web-driver-inspector@1.0.0 No repository field.
up to date in 6.967s
Validating Inspector
No errors!
Oops! Something went wrong! :(
ESLint couldn't find the plugin "eslint-plugin-mocha". This can happen for a couple different reasons:
If ESLint is installed globally, then make sure eslint-plugin-mocha is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
npm i eslint-plugin-mocha@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
看看是这个问题吗?
https://testerhome.com/topics/11403
解决是注释掉了:
#desired_caps['automationName']='uiautomator2'
网上找一圈没有找到解决办法,下班的时候突然想到把下面这行注释掉,结果第二天来检查,没有出现过这种错误。
#desired_caps['automationName']='uiautomator2'