Appium 1.9.1 启动报错 Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new'

安装了appium 1.9.1后一直报错Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new',无法启动,卸载后安装1.8.1可以正常使用了。

npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm uninstall -g appium
cnpm install -g appium@1.8.1
rm /usr/local/bin/appium
ln -s /usr/local/Cellar/node/10.12.0/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium
yang$ appium [Appium] Welcome to Appium v1.
8.1 [Appium] Appium REST http interface listener started on 0.0.0.0:4723

之前安装的1.9.0  1.9.1都报错,无法启动:

[appium@1.9.1] link /usr/local/Cellar/node/10.12.0/bin/appium@ -> /usr/local/Cellar/node/10.12.0/lib/node_modules/appium/build/lib/main.js

yang$ /usr/local/Cellar/node/10.12.0/lib/node_modules/appium/build/lib/main.js

(node:9164) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

[Appium] Welcome to Appium v1.9.1

Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new'

at new AppiumDriver (/usr/local/Cellar/node/10.12.0/lib/node_modules/appium/lib/appium.js:131:19)

at main$ (/usr/local/Cellar/node/10.12.0/lib/node_modules/appium/lib/main.js:124:16)

at tryCatch (/usr/local/Cellar/node/10.12.0/lib/node_modules/appium/node_modules/_babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:67:40)

at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/Cellar/node/10.12.0/lib/node_modules/appium/node_modules/_babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:315:22)

at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/Cellar/node/10.12.0/lib/node_modules/appium/node_modules/_babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:100:21)

at GeneratorFunctionPrototype.invoke (/usr/local/Cellar/node/10.12.0/lib/node_modules/appium/node_modules/_babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:136:37)

yang$ cnpm uninstall -g appium

 

资料推荐:

Jmeter
链接: https://pan.baidu.com/s/19k2ysPbid8asXRLyHlD87Q&shfl=shareset 提取码: cwz1

更多资料欢迎关注我的公众号获取,关注后

回复关键字:简历模板,java,python,数据结构,linux,运维,哈佛学霸,算法,创业即可获取相关资料。

posted @ 2018-10-21 00:03  船长博客  阅读(1481)  评论(0编辑  收藏  举报
永远相信美好的事情即将发生!