Cypress CI vsts not finding binary

为君一笑 提交于 2021-01-01 04:45:36

问题


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

Build Pipeline

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

Release

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:

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.


回答1:


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.

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.

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.

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

.\cypress install

in your powershell command.

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.



来源:https://stackoverflow.com/questions/58275454/cypress-ci-vsts-not-finding-binary

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