Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket CI example using node:latest fails #6048

Closed
MikeMcC399 opened this issue Dec 16, 2024 · 1 comment · Fixed by #6049
Closed

Bitbucket CI example using node:latest fails #6048

MikeMcC399 opened this issue Dec 16, 2024 · 1 comment · Fixed by #6049

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Dec 16, 2024

Description

The example Continuous Integration > Bitbucket Pipelines > Basic Setup fails to run.

The example code for bitbucket-pipelines.yml is

image: node:latest

pipelines:
  default:
    - step:
        script:
          # install dependencies
          - npm ci
          # start the server in the background
          - npm run start &
          # run Cypress tests
          - npm run e2e

The error indicates a missing dependency:

Your system is missing the dependency: Xvfb
Install Xvfb and run Cypress again.
Read our documentation on dependencies for more information:
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
Error: spawn Xvfb ENOENT
----------
Platform: linux-x64 (Debian - 12.8)
Cypress Version: 13.16.1

Background

In order to allow Cypress to run using the Docker image node:latest, it needs the set of Linux prerequisites for Debian/Ubuntu installed. Testing against https://github.com/cypress-io/cypress-example-kitchensink, the minimum additional Debian package installation instructions are:

          - apt-get update
          - apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnss3 libasound2 xvfb -y

Adding the step of installing Linux prerequisites for Debian/Ubuntu to node:latest would make the example unnecessarily complex. node:latest is currently equivalent to node:current-bookworm which is in turn based on debian:bookworm.

Cypress Docker images are optimized for Cypress usage. They are based on debian:bookworm-slim rather than debian:bookwork, so they are smaller, and they include all Linux prerequisites for Cypress, replacing the need for an extra installation step.

Suggestion

Remove the Bitbucket Pipelines example using the Docker image node:latest. Add a comment referring to Testing with Cypress Docker Images as the configuration of choice for Bitbucket Pipelines.

@MikeMcC399
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant