gpt4 book ai didi

jenkins - 在 Jenkins 上运行 Cypress 时缺少依赖项

转载 作者:行者123 更新时间:2023-12-05 07:06:35 24 4
gpt4 key购买 nike

我试图让 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

Cypress 的官方文档 https://docs.cypress.io/guides/guides/continuous-integration.html#Advanced-setup没有适合我的答案。

我缺少什么依赖项?安装 xvfb 没有帮助。

最佳答案

这是 Linux 机器中的常见错误。 https://docs.cypress.io/guides/continuous-integration/introduction.html#Dependencies中提供了解决方案

sudo yum install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib

关于jenkins - 在 Jenkins 上运行 Cypress 时缺少依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62414819/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com