【问题标题】:Error while running conf.js file from Eclipse从 Eclipse 运行 conf.js 文件时出错
【发布时间】:2017-05-10 21:41:26
【问题描述】:

我开始使用 eclipse 使用量角器,配置了所有东西,nodejs,量角器,webdriver,但是在使用 eclipse 运行量角器时,我遇到了量角器的以下问题。

谁能帮帮我。

环境详情:

C:\Users\User>protractor --version
Version 5.1.1

C:\Users\User>npm --version
3.10.10

C:\Users\User>npm-windows-upgrade
'npm-windows-upgrade' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\User>node -v
v6.10.3

面临的错误

**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)**

【问题讨论】:

    标签: protractor


    【解决方案1】:

    该错误提示解析webdriver-manager的Javascript有错误。 webdriver-manager 已更新到 ES6(这就是我们需要 Node 6+ 的原因)并在过去为旧版本的节点抛出了 ... 错误。

    基于此,我会说 Eclipse 在旧版本上运行。在搜索webdriver-manager git 后,我找到了this issue。我认为它符合您的问题,还为您提供了检查 Eclipse 正在使用哪个版本的步骤。

    希望对你有帮助

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多