[Docker] No version of Cypress is installed
See original GitHub issueCurrent behavior:
Sometimes, when I launch yarn cypress:open
from my docker container, it fails:
(before that a yarn install
as been execute)
root@ecc2886f9e9e:/usr/src/client# yarn cypress:open
yarn run v1.16.0
$ cypress open
No version of Cypress is installed in: /root/.cache/Cypress/3.3.1/Cypress
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: /root/.cache/Cypress/3.3.1/Cypress/Cypress
----------
Platform: linux (Debian - 9.9)
Cypress Version: 3.3.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Desired behavior:
It should work everytime.
Steps to reproduce: (app code and test code)
Versions
cypress 3.3.1
running on Ubuntu 18.04.2 LTS Docker version 18.09.6, build 481bc77 docker-compose version 1.24.0, build 0aa59064
Step 6/7 : RUN echo " node version: $(node -v) \n" "npm version: $(npm -v) \n" "yarn version: $(yarn -v) \n" "debian version: $(cat /etc/debian_version) \n" "Chrome version: $(google-chrome --version) \n"
---> Running in 39ab6e031d37
node version: v10.16.0
npm version: 6.9.0
yarn version: 1.16.0
debian version: 9.9
Chrome version: Google Chrome 75.0.3770.90
This is my docker configuration
Dockerfile:
FROM node:10.16.0
RUN apt-get update && \
apt-get install -y \
libgtk2.0-0 \
libnotify-dev \
libgconf-2-4 \
libnss3 \
libxss1 \
libasound2 \
xvfb \
zip
RUN echo "install last google-chrome-stable"
RUN \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y dbus-x11 google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
RUN echo " node version: $(node -v) \n" \
"npm version: $(npm -v) \n" \
"yarn version: $(yarn -v) \n" \
"debian version: $(cat /etc/debian_version) \n" \
"Chrome version: $(google-chrome --version) \n"
RUN mkdir -p /usr/src/client
docker-compose.yml:
version: "3.7"
services:
front:
build: ./docker
container_name: frontend
tty: true
working_dir: /usr/src/client
environment:
- DISPLAY
ports:
- 8082:8082
volumes:
- .:/usr/src/client:rw
- ~/.cache/yarn:/usr/local/share/.cache/yarn:rw
- /tmp/.X11-unix:/tmp/.X11-unix
networks:
default:
external:
name: amms
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Run Cypress with a single Docker command
We have listened and created a Docker image with Cypress installed. It is called cypress/included and is tagged with the version of Cypress...
Read more >No version of Cypress is installed in Ci (TravisCI and CircleCI)
This a small problem with caching node_modules - the post-install script that installs the Cypress binary won't be run since ...
Read more >End-to-end testing with Cypress series: 02 Getting Started
Initializing test suite notice. After running npx cypress open , you may see a message that no version of Cypress is installed in...
Read more >Skip Cypress Install On CI - Gleb Bahmutov
Can you add Cypress without modifying lots of installation and caching ... using a cypress/included Docker image with Cypress pre-installed.
Read more >cypress/base - Docker Image
Docker images that include all operating system dependencies necessary to run Cypress, but NOT Cypress itself and no pre-installed browsers.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If someone still has a problem with this, it’s due to linux permissions. I had to change user to a
non-root user
then change permissions for{user}./cache
directory and then I rannpm i
as the samenon-root user
did anyone find a solution to this? I seem to be experiencing the same issue
dockerfile:
RUN CYPRESS_CACHE_FOLDER=/root/.cache/Cypress yarn cypress install
output:
No version of Cypress is installed in: /root/.cache/Cypress/9.5.1/Cypress