cypress: The cypress npm package is installed, but the Cypress binary is missing error
Current behavior
I am using docker to install cypress and I am facing the below error every time I am doing Cypress verify.
"The cypress npm package is installed, but the Cypress binary is missing. We expected the binary to be installed here: /root/.cache/Cypress/9.5.3/Cypress/Cypress Reasons it may be missing:
- You’re caching ‘node_modules’ but are not caching this path: /root/.cache/Cypress You ran ‘npm install’ at an earlier build step but did not persist: /root/.cache/Cypress Properly caching the binary will fix this error and avoid downloading and unzipping Cypress. )Alternatively, you can run ‘cypress install’ to download the binary again. https://on.cypress.io/not-installed-ci-error "
Here is the docker code :
FROM docker.repo.frg.tech/cypress/base:14.16.0
RUN curl \
jq
ENV CI=1
COPY package.json ./
RUN yarn install --frozen-lockfile
RUN npx cypress cache path
RUN npx cypress cache list
RUN npx cypress cache clear
RUN DEBUG=cypress:cli,xvfb yarn cypress install
RUN npx cypress verify
COPY . .
Debug logs
RUN DEBUG=cypress:cli,xvfb yarn cypress install
---> Running in 6a66dfe03836
yarn run v1.22.10
$ /node_modules/.bin/cypress install
cypress:cli NODE_OPTIONS is not set
cypress:cli parsed cli options {}
cypress:cli installing with options {}
cypress:cli version in package.json is 9.5.3, version to install is 9.5.3
cypress:cli Reading binary package.json from: /root/.cache/Cypress/9.5.3/Cypress/resources/app/package.json
cypress:cli no binary installed under cli version
cypress:cli checking local file /9.5.3 cwd /
cypress:cli preparing to download and unzip version 9.5.3 to path /root/.cache/Cypress/9.5.3
[STARTED] Task without title.
cypress:cli needed Cypress version: 9.5.3
cypress:cli source url https://download.cypress.io/desktop/9.5.3?platform=linux&arch=x64
cypress:cli downloading cypress.zip to "/tmp/cypress-18.zip"
cypress:cli Downloading package {
url: '[https://download.cypress.io/desktop/9.5.3?platform=linux&arch=x64'](https://download.cypress.io/desktop/9.5.3?platform=linux&arch=x64%27),
proxy: 'http://proxy-infra.frg.tech:3128'/,
downloadDestination: '/tmp/cypress-18.zip'
Done in 0.48s.
Removing intermediate container 6a66dfe03836
---> 39b6b7cd7736
Cypress Version
9.5.3
Package Manager
yarn
Operating system
Linux
Other
Platform: linux-x64 (Debian - 10.8)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (2 by maintainers)
Facing the same issue while installing Cypress from the local binary through CYPRESS_INSTALL_BINARY variable.
Cypress.app is found under “/home/jenkins/.cache/Cypress/9.7.0/Cypress.app” but while running the cypress run command it throws error like “We expected the binary to be installed here: /home/jenkins/.cache/Cypress/9.7.0/Cypress/Cypress”
Why it’s not looking for the correct path which would be “/home/jenkins/.cache/Cypress/9.7.0/Cypress.app”
I have the same error in my CI/CD pipeline.
I was able to resolve the issue by changing our proxy settings. But still Cypress 9.5.3 dosen’t log the issue , I used Cypress 9.0.0 and then saw the actual issue with the binary download. Please update 9.5.3 to log the issues.