出错的提示如下

λ appium --help

C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:380
        parts.forEach(function (part) {
              ^
TypeError: parts.forEach is not a function
    at _getLines (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:380:15)
    at HelpFormatter._formatUsage (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:418:17)
    at C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:67:17
    at Array.map (native)
    at Section.formatHelp (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:61:26)
    at HelpFormatter.formatHelp (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:300:32)
    at ArgumentParser.formatUsage (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:1026:20)
    at ArgumentParser.printUsage (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:1082:27)
    at ArgumentParser.error (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:1156:8)
    at ArgumentParser.parseKnownArgs (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:297:10)
    at ArgumentParser.parseArgs (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:234:21)
    at ArgumentParser.parser.parseArgs (../../lib/parser.js:752:29)
    at main$ (../../lib/main.js:146:4)
    at tryCatch (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:100:21)
    at invoke (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:136:37)
    at enqueueResult (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:185:17)
    at Promise.F (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_core-js@1.2.7@core-js\library\modules\$.export.js:30:36)
    at AsyncIterator.enqueue (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:100:21)
    at Object.runtime.async (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:209:12)
    at main (../../lib/main.js:152:13)
    at asyncify (lib/asyncbox.js:65:15)
    at Object.<anonymous> (../../lib/main.js:183:2)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:505:3


↙↙↙阅读原文可查看相关链接,并与作者交流