Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Failed on running npx cypress verify #112

Open
convers39 opened this issue Sep 27, 2022 · 1 comment
Open

Failed on running npx cypress verify #112

convers39 opened this issue Sep 27, 2022 · 1 comment

Comments

@convers39
Copy link

Folder structure as below:

.
├── README.md
├── docker-compose.yaml
├── e2e
├── backend
├── client
└── template-backend.yaml

3 directories, 5 files
FROM cypress/base:14
WORKDIR /app

# dependencies will be installed only if the package files change
COPY package*.json ./

# by setting CI environment variable we switch the Cypress install messages
# to small "started / finished" and avoid 1000s of lines of progress messages
# https://github.com/cypress-io/cypress/issues/1243
ENV CI=1
RUN npm ci
# verify that Cypress has been installed correctly.
# running this command separately from "cypress run" will also cache its result
# to avoid verifying again when running the tests
RUN npx cypress verify
version: "3.8"
networks:
  default:
services:
  client:
    depends_on:
      - backend
      # ..
  backend:
      # ..
  e2e:
    image: cypress
    build: ./e2e
    container_name: cypress
    depends_on:
      - client
      - backend
    environment:
      - CYPRESS_baseUrl=http://client:3000
    command: npx cypress run
    volumes:
      - ./e2e/cypress:/app/cypress
      - ./e2e/cypress.config.js:/app/cypress.config.js
    networks:
      - default

image

@arorahanisha50
Copy link

Looks like there are some depenedencies missing. Try this
In your Dockerfile:
Use image cypress/browsers and install the dependencies
RUN apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

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

No branches or pull requests

2 participants