【发布时间】:2020-10-06 10:26:25
【问题描述】:
我正在尝试让 cypress 在远程服务器上的 jenkins 上运行(平台:linux(Alpine Linux - 3.7.0)。每次单击“立即构建”时,都会失败并显示以下消息:
+ npm install
npm WARN cypress_test@1.0.0 No repository field.
up to date in 1.217s
[Pipeline] sh (Run tests)
+ npx cypress run
It looks like this is your first time using Cypress: 4.7.0
[?25l[17:51:40] Verifying Cypress can run /root/.cache/Cypress/4.7.0/Cypress [started]
[17:51:41] Verifying Cypress can run /root/.cache/Cypress/4.7.0/Cypress [failed]
[?25hCypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
spawn /root/.cache/Cypress/4.7.0/Cypress/Cypress ENOENT
----------
Platform: linux (Alpine Linux - 3.7.0)
Cypress Version: 4.7.0
[?25h[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
赛普拉斯官方文档https://docs.cypress.io/guides/guides/continuous-integration.html#Advanced-setup 没有适合我的答案。
我缺少什么依赖项?安装 xvfb 没有帮助。
【问题讨论】:
-
您是否尝试过使用他们建议的操作系统之一,而不是 alpine?
-
我无法控制该 aws 服务器上使用的操作系统
-
那你有没有看过例如github.com/cypress-io/cypress/issues/419?
-
感谢您指出该线程 - 我没有遇到它。看来 Cypress+Jenkins 无法在 Alpine-linux 上运行。