Syntax error on webdriver-manager 10.2.9

2019-04-09 11:20发布

Post from issue #170:

After updating to the newest version, I get the following error on running 'webdriver-manager' command.

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)

2条回答
爷的心禁止访问
2楼-- · 2019-04-09 11:28

Why is this happening? Version 10.2.9 requires node 6 and since it did not follow semantic versioning / caused a big problem, it was unpublished from npm and 10.2.10 has been published. To read more about 10.2.10, see the changelog.

If you have encountered this issue, please remove the node_module/webdriver-manager and do a fresh npm install.

查看更多
仙女界的扛把子
3楼-- · 2019-04-09 11:35

You can downgrade webdriver version to 9.0 with this command:

npm install -g webdriver-manager@9.0
查看更多
登录 后发表回答