【Appium踩坑】iOS WebDriverAgent 执行./Scripts/bootstrap.sh报错

本文介绍了解决Appium XCUITest WebDriverAgent在编译过程中遇到的错误的方法。通过修改webpack.config.js文件,去除对node_modules的排除,解决了因解析失败导致的编译错误。

参考testerhome解决思路

1、解决方法:

webpack.config.js 文件里去掉 exclude: /node_modules/(忽略node_modules)

文件路径:
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/webpack.config.js
修改前:
loaders: [
      {
   
    test: /\.js?$/, loaders: ['babel-loader'], exclude: /node_modules/ },
      {
   
    test: /\.css?$/, loader: 'style-loader!css-loader' },
    ]
修改后:
loaders: [
      {
   
    test: /\.js?$/, loaders: ['babel-loader'] },
      {
   
    test: /\.css?$/, loader: 'style-loader!css-loader' },
    ]
重新执行 ./Scripts/bootstrap.sh

执行成功✅

➜  /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
> ./Scripts/bootstrap.sh
Fetching dependencies
Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
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 webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值