赛普拉斯CI vsts找不到二进制文件 [英] Cypress CI vsts not finding binary

查看:68
本文介绍了赛普拉斯CI vsts找不到二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能否请您给我一些有关如何解决此问题的建议.

Could you please give me some advise on how to deal with this issue.

构建管道

npm install
package.json
"dependencies": {
    "cypress": "^3.4.1"
  }

发布

Powershell命令

Powershell command

npm ./node_modules/.bin/Cypress run

The cypress npm package is installed, but the Cypress binary is missing.

2019-10-07T18:04:59.5720120Z We expected the binary to be installed here:

有一些有关如何缓存〜/.npm的示例,但到目前为止似乎没有任何效果.关于如何在您的vsts中包含cypress.io的示例是在构建阶段而不是发布之后.

There are some examples on how to cache ~/.npm but nothing seems to work so far. Examples on how to include cypress.io in your vsts are at the building stage and not after release.

推荐答案

根据错误日志,它提供了有关此问题的解决方案.您应该先运行cypress install命令,然后该错误将得到解决.

According to the error log, it has provided a solution about this. You should run the cypress install command first and then the error will be fixed.

作为测试,由于我没有cypress.json文件,因此我需要运行open命令来自动生成获取json文件和项目示例.然后,打开命令将按预期运行.

As my test, since I don't have a cypress.json file, so I need run the open command to automatic generated get the json file and project sample. Then the open command run as expected.

但是因为我以交互方式运行open命令并且我的工件中没有cypress.json文件,所以这些任务最终失败了.

But because I run the open command in interactive mode and I don't have the cypress.json file in my artifacts, the taks finally failed.

因此,如果您的存储库或工件中包含cypress.json,则只需添加

So if you have cypress.json in your repo or artifacts, you just need to add

.\cypress install

在您的powershell命令中.

in your powershell command.

如果没有,则可以将相关的json文件和文件夹添加到存储库或工件中,然后run命令将按预期工作.

And if not, you can add the related json file and folder to your repo or artifacts and then the run command will work as your expected.

这篇关于赛普拉斯CI vsts找不到二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆