Error: Unable to resolve path to module `js/http`, `js/tree` etc on running `./Scripts/bootstrap.sh`

一世执手 提交于 2019-12-12 05:27:44

问题


Getting error while running command ./Scripts/bootstrap.sh under directory: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

EggCloudMachine-1:WebDriverAgent admin$ ./Scripts/bootstrap.sh
Fetching dependencies
Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN web-driver-inspector@1.0.0 No repository field.

up to date in 5.731s
Validating Inspector
No errors!

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js
  12:18  error  Unable to resolve path to module 'js/http'                import/no-unresolved
  13:20  error  Unable to resolve path to module 'js/screen'              import/no-unresolved
  14:31  error  Unable to resolve path to module 'js/screenshot_factory'  import/no-unresolved
  15:18  error  Unable to resolve path to module 'js/tree'                import/no-unresolved
  16:22  error  Unable to resolve path to module 'js/tree_node'           import/no-unresolved
  17:25  error  Unable to resolve path to module 'js/tree_context'        import/no-unresolved
  18:23  error  Unable to resolve path to module 'js/inspector'           import/no-unresolved
  27:14  error  Missing space before function parentheses                 space-before-function-paren
  32:13  error  Missing space before function parentheses                 space-before-function-paren
  37:20  error  Missing space before function parentheses                 space-before-function-paren
  41:18  error  Missing space before function parentheses                 space-before-function-paren
  48:13  error  Expected property shorthand                               object-shorthand
  55:12  error  Missing space before function parentheses                 space-before-function-paren
  64:9   error  Missing space before function parentheses                 space-before-function-paren

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/http.js
  13:13  error    Missing space before function parentheses  space-before-function-paren
  13:20  warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  19:7   error    Unexpected var, use let or const instead   no-var
  20:7   warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  25:14  error    Missing space before function parentheses  space-before-function-paren
  25:27  warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  29:7   error    Expected property shorthand                object-shorthand
  32:7   error    Unexpected var, use let or const instead   no-var
  33:7   warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/image_utils.js
  11:34  error    Missing space before function parentheses  space-before-function-paren
  11:55  warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  15:40  error    Missing space before function parentheses  space-before-function-paren
  15:69  warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  16:5   error    Unexpected var, use let or const instead   no-var
  20:5   error    Unexpected var, use let or const instead   no-var
  28:45  error    Missing space before function parentheses  space-before-function-paren
  28:79  warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  29:5   error    Unexpected var, use let or const instead   no-var
  33:5   error    Unexpected var, use let or const instead   no-var
  41:22  error    Missing space before function parentheses  space-before-function-paren
  41:31  warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks
  42:5   error    Unexpected var, use let or const instead   no-var
  44:28  error    Missing space before function parentheses  space-before-function-paren
  45:7   warning  Avoid callbacks. Prefer Async/Await        promise/prefer-await-to-callbacks

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/inspector.js
  13:18  error  Unable to resolve path to module 'js/http'  import/no-unresolved
  14:1   error  Unexpected var, use let or const instead    no-var
  18:22  error  Missing space before function parentheses   space-before-function-paren
  23:9   error  Missing space before function parentheses   space-before-function-paren
  38:18  error  Missing space before function parentheses   space-before-function-paren
  64:14  error  Missing space before function parentheses   space-before-function-paren
  68:5   error  Unexpected var, use let or const instead    no-var
  86:6   error  Missing space before function parentheses   space-before-function-paren
  89:9   error  Unexpected var, use let or const instead    no-var
  97:13  error  Unexpected var, use let or const instead    no-var
  98:13  error  Unexpected var, use let or const instead    no-var

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/screen.js
   13:18  error  Unable to resolve path to module 'js/http'    import/no-unresolved
   15:1   error  Unexpected var, use let or const instead      no-var
   20:9   error  Missing space before function parentheses     space-before-function-paren
   45:22  error  Missing space before function parentheses     space-before-function-paren
   46:5   error  Unexpected var, use let or const instead      no-var
   53:13  error  Missing space before function parentheses     space-before-function-paren
   57:20  error  Missing space before function parentheses     space-before-function-paren
   58:5   error  Unexpected var, use let or const instead      no-var
   59:5   error  Unexpected var, use let or const instead      no-var
   61:5   error  Unexpected var, use let or const instead      no-var
   63:5   error  Unexpected var, use let or const instead      no-var
   73:9   error  Unexpected var, use let or const instead      no-var
   77:13  error  Expected property shorthand                   object-shorthand
   78:13  error  Expected property shorthand                   object-shorthand
   88:7   error  Missing space before function parentheses     space-before-function-paren
   98:19  error  Missing space before function parentheses     space-before-function-paren
  111:24  error  Missing space before function parentheses     space-before-function-paren
  124:34  error  Missing space before function parentheses     space-before-function-paren
  125:5   error  Unexpected var, use let or const instead      no-var
  130:5   error  Unexpected var, use let or const instead      no-var
  133:5   error  Unexpected var, use let or const instead      no-var
  137:75  error  Missing space before opening brace            space-before-blocks
  138:9   error  Expected indentation of 6 spaces but found 8  indent

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/screenshot_factory.js
  10:24  error    Unable to resolve path to module 'js/image_utils'  import/no-unresolved
  12:30  error    Missing space before function parentheses          space-before-function-paren
  13:3   error    Unexpected var, use let or const instead           no-var
  14:3   error    Unexpected var, use let or const instead           no-var
  15:3   error    Unexpected var, use let or const instead           no-var
  17:3   error    Unexpected var, use let or const instead           no-var
  18:3   error    Unexpected var, use let or const instead           no-var
  23:26  error    Missing space before function parentheses          space-before-function-paren
  23:60  warning  Avoid callbacks. Prefer Async/Await                promise/prefer-await-to-callbacks
  33:28  error    Missing space before function parentheses          space-before-function-paren
  37:22  error    Missing space before function parentheses          space-before-function-paren
  37:43  warning  Avoid callbacks. Prefer Async/Await                promise/prefer-await-to-callbacks
  51:34  error    Missing space before function parentheses          space-before-function-paren
  51:42  warning  Avoid callbacks. Prefer Async/Await                promise/prefer-await-to-callbacks
  52:5   error    Unexpected var, use let or const instead           no-var
  58:5   warning  Avoid callbacks. Prefer Async/Await                promise/prefer-await-to-callbacks

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree.js
   23:9   error  Missing space before function parentheses  space-before-function-paren
   42:16  error  Missing space before function parentheses  space-before-function-paren
   46:21  error  Missing space before function parentheses  space-before-function-paren
   52:13  error  Missing space before function parentheses  space-before-function-paren
   64:13  error  Missing space before function parentheses  space-before-function-paren
   84:5   error  Unexpected var, use let or const instead   no-var
  101:14  error  Missing space before function parentheses  space-before-function-paren
  107:19  error  Missing space before function parentheses  space-before-function-paren
  113:19  error  Missing space before function parentheses  space-before-function-paren

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree_context.js
  11:14  error  Missing space before function parentheses  space-before-function-paren
  16:21  error  Missing space before function parentheses  space-before-function-paren

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree_node.js
  11:19  error  Missing space before function parentheses  space-before-function-paren
  18:23  error  Missing space before function parentheses  space-before-function-paren
  19:5   error  Unexpected var, use let or const instead   no-var
  26:23  error  Missing space before function parentheses  space-before-function-paren
  27:5   error  Unexpected var, use let or const instead   no-var
  36:19  error  Missing space before function parentheses  space-before-function-paren
  49:14  error  Missing space before function parentheses  space-before-function-paren

✖ 106 problems (93 errors, 13 warnings)

回答1:


This error will not effect your xcode build or browser launch on ios. Try running the above command with -d ./Scripts/bootstrap.sh -d or sh ./Scripts/bootstrap.sh -d

If still your build fails then this should be some other issue.



来源:https://stackoverflow.com/questions/44409604/error-unable-to-resolve-path-to-module-js-http-js-tree-etc-on-running-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!