(1)在cmd输入:npm是国外源,需要配置为国内源
npm config set registry https://registry.npm.taobao.org
(2)然后执行:
npm install -g appium@1.19.1
报错信息如下:
[10:32:46] Downloading Chromedriver can be skipped by using the '--chromedriver-skip-install' flag or[npminstall: runscript:error] appium-uiautomator2-driver@1.75.0 〉 appium-chromedriver@^4.23.1 scripts.ode install-npm. js"error, exit code 1
at ChildProcess.<anonymous> (/usr/loca1/lib/node_modules/cnpm/node_modules/ runscript/index.js:96:at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12){stdio: [object] ,
exitcode: 1
Install fail! RunScriptError: post install error, please remove node_modules before retry!Run "sh -c node install-npm.js" error, exit code 1
RunScriptError: Run "sh -c node install-npm.js" error,exit code 1
at ChildProcess,<anonymous> (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:96:at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)npminstall version: 6.2.0
npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/instps: / /npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com -g appium
根据报错信息可以加–chromedriver-skip-install跳过driver的安装,执行一下命令,就可以啦~~~
npm install -g appium@1.19.1 --chromedriver-skip-install
以上是简单分享,喜欢软件测试的小伙伴们,如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “点赞” “评论” “收藏” 一键三连哦!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)