webdriver-manager 10.2.9 语法错误

Syntax error on webdriver-manager 10.2.9

Post 来自 issue #170:

更新到最新版本后,运行 'webdriver-manager' 命令出现以下错误。

C:\Users\(user)\AppData\Roaming\npm\node_modules\webdriver-manager\built\lib\cli\logger.js:66
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\(user)\AppData\Roaming\npm\node_modules\we
bdriver-manager\built\lib\cli\index.js:8:10)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

为什么会这样?版本 10.2.9 需要节点 6,因为它不遵循语义版本控制/导致了一个大问题,它从 npm 取消发布,10.2.10 已经发布。要阅读有关 10.2.10 的更多信息,请参阅 changelog.

如果您遇到此问题,请删除 node_module/webdriver-manager 并重新执行 npm install

您可以使用以下命令将 webdriver 版本降级到 9.0:

npm install -g webdriver-manager@9.0