SerenityJS-NPM CI命令入门问题-SerenityBDD CLI jar



我正在Mac上工作,我正试图开始使用Serenity JS模板项目,可以在这里找到:https://github.com/serenity-js/serenity-js-cucumber-protractor-template.在我安装了所有的先决条件并克隆了代码之后;npm-ci";命令,失败并出现错误:

Looks like you need the latest Serenity BDD CLI jar. Let me download it for you...
I'm terribly sorry, but something didn't go according to plan.
The API call has failed

我在我的个人电脑上遵循了同样的过程,没有出现这个问题。所以,也许这与我工作机器的安全性有关?我有管理权限,但不能运行任何sudo命令。如有任何建议,我们将不胜感激。

@serenity-js/serenity-bdd模块无法下载Serenity BDD报告CLI时,会显示此错误,该CLI是通过https://jcenter.bintray.com/分发的Java工件(.jar(。

npm installnpm ci命令调用package.json:中的postinstall脚本时,会调用下载进程本身

"postinstall": "serenity-bdd update"

工作设置中出现此错误可能有几个原因:

  • 您的机器可能会被限制调用外部工件存储库,如jcenter.bintray.com。如果是这种情况,那么您很可能有一个内部工件存储库(如Artifactory或Nexus(,它反映了外部repo。如果你有,那么你可以告诉serenity-bdd从那里取.jar
"postinstall": "serenity-bdd update --repository https://mycompany.com/artfactory"
  • 另一个常见问题是公司代理扰乱SSL证书,您可以通过指示serenity-bdd忽略任何无效证书来避免这种情况:
"postinstall": "serenity-bdd update --ignoreSSL"

希望这能有所帮助!

1月

最新更新