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

SerenityJS - Problem Getting Started with NPM CI Command - Serenity-BDD 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 命令。任何建议都会被采纳ci。

@serenity-js/serenity-bdd 模块无法下载 Serenity BDD 报告 CLI - 一个 Java 工件(.jar)通过 https://jcenter.bintray.com/.[=25 分发时,会出现此错误=]

npm installnpm ci 命令在 package.json 中调用此 postinstall script 时,将调用下载过程本身:

"postinstall": "serenity-bdd update"

在工作环境中出现此错误可能有多种原因:

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

希望对您有所帮助!

一月