Cypress Codebuild项目无法启动

huangapple go评论65阅读模式
英文:

Cypress Codebuild Project Fails To Start

问题

我有一个CodeBuild Cypress项目,运行一个buildspec文件来运行我的所有Cypress测试。我最近升级到Cypress v12和Node 16,现在当我运行我的CodeBuild项目时,出现以下错误:

/root/.cache/Cypress/12.0.0/Cypress/Cypress: error while loading shared libraries: libatk-bridge-2.0.so.0: cannot open shared object file: No such file or directory.
Platform: linux-x64 (Amazon Linux - 2 (Karoo))

有谁知道如何修复这个问题吗?

我尝试了一些方法,比如:

yum install gtk3

但没有任何效果。

有人遇到过Cypress v12的这个问题吗?

英文:

I have a codebuild cypress project that runs a buildspec file in order to run all of my cypress tests. I have recently updated to cypress v12 and node 16 and now when I run my codebuild project I get the following error:

/root/.cache/Cypress/12.0.0/Cypress/Cypress: error while loading shared libraries: libatk-bridge-2.0.so.0: cannot open shared object file: No such file or directory. 
Platform: linux-x64 (Amazon Linux - 2 (Karoo))

Does anyone know how to fix this?

I have tried a few things like:

yum install gtk3

but nothing is working.

Has anyone run into this with cypress v12?

答案1

得分: 1

在运行我的Cypress测试时,我遇到了与这些库类似的问题。在我的情况下,我在buildspec文件的安装阶段中添加了以下几行来解决它:

sudo amazon-linux-extras install epel -y
sudo yum install -y chromium

只需确保您的实例类型是Amazon Linux类型(我使用了'aws/codebuild/amazonlinux2-x86_64-standard:4.0')。

英文:

I faced similar issues with these libraries while running my Cypress tests in CodeBuild, in my case I added these lines in the install phase of the buildpsec file to solve it:

sudo amazon-linux-extras install epel -y
sudo yum install -y chromium

Just ensure your instance type is of type Amazon Linux (I used 'aws/codebuild/amazonlinux2-x86_64-standard:4.0')

huangapple
  • 本文由 发表于 2023年4月7日 02:38:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75952742.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定