Syntax error on webdriver-manager 10.2.9

核能气质少年 提交于 2019-12-06 05:05:59

问题


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)

回答1:


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.




回答2:


You can downgrade webdriver version to 9.0 with this command:

npm install -g webdriver-manager@9.0


来源:https://stackoverflow.com/questions/40929821/syntax-error-on-webdriver-manager-10-2-9

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