在真机上 WebDriverAgentRunner 可以打开,但是在终端输入./Scripts/bootstrap.sh 后报错,报错信息如下 请各位帮忙看一下怎么解决。我从 git 上重新下了个 WebDriverAgent 但是还是同样的错误
bogon:WebDriverAgent yefengjun$ ./Scripts/bootstrap.sh
Fetching dependencies
Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN react-treeview@0.4.6 requires a peer of react@>=0.14.0 but none was installed.
npm WARN web-driver-inspector@1.0.0 No repository field.
Building Inspector...
> web-driver-inspector@1.0.0 build /Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector
> webpack --progress --colors
Hash: 9ed7d0b85cc08341fd0f
Version: webpack 1.14.0
Time: 72ms
[0] multi main 28 bytes {0} [built] [1 error]
+ 1 hidden modules
ERROR in ./js/app.js
Module parse failed: /Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js Unexpected token (59:4)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (59:4)
at Parser.pp$4.raise (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp.unexpected (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:603:10)
at Parser.pp$3.parseExprAtom (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1822:12)
at Parser.pp$3.parseExprSubscripts (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1692:19)
at Parser.pp$3.parseExprOps (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1637:21)
at Parser.pp$3.parseMaybeConditional (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1620:21)
at Parser.pp$3.parseMaybeAssign (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1597:21)
at Parser.pp$3.parseParenAndDistinguishExpression (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1861:32)
at Parser.pp$3.parseExprAtom (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1796:19)
at Parser.pp$3.parseExprSubscripts (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1692:19)
at Parser.pp$3.parseExprOps (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1637:21)
at Parser.pp$3.parseMaybeConditional (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1620:21)
at Parser.pp$3.parseMaybeAssign (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1597:21)
at Parser.pp$3.parseExpression (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1573:21)
at Parser.pp$1.parseReturnStatement (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:839:33)
at Parser.pp$1.parseStatement (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:699:34)
at Parser.pp$1.parseBlock (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:981:25)
at Parser.pp$3.parseFunctionBody (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:2105:24)
at Parser.pp$3.parseMethod (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:2075:10)
at Parser.pp$1.parseClassMethod (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1137:25)
at Parser.pp$1.parseClass (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:1118:14)
at Parser.pp$1.parseStatement (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:697:19)
at Parser.pp$1.parseTopLevel (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:638:25)
at Parser.parse (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:516:17)
at Object.parse (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/acorn/dist/acorn.js:3098:39)
at Parser.parse (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/lib/Parser.js:902:15)
at DependenciesBlock.<anonymous> (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/lib/NormalModule.js:104:16)
at DependenciesBlock.onModuleBuild (/Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
@ multi main
Done