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

Describe how to solve "cached binary not found" error on CI #2140

Closed
bahmutov opened this issue Oct 8, 2019 · 7 comments
Closed

Describe how to solve "cached binary not found" error on CI #2140

bahmutov opened this issue Oct 8, 2019 · 7 comments

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Oct 8, 2019

Dominic Elm, our ambassador had this problem in branch https://travis-ci.org/d3lm/ngx-drag-to-select/jobs/594782686 where yarn would not install Cypress binary. The docs in https://docs.cypress.io/guides/references/error-messages.html#A-Cached-Cypress-Binary-Could-not-be-found are less than clear. I think we can put an additional section there telling to:

  • upgrade yarn or npm version to avoid their bugs
  • trigger clean rebuild by telling CI to clean its cache and rebuild
  • run install with DEBUG=cypress:cli environment variable to see what is going with the installation
  • run npx cypress cache path and npx cypress cache list to see installed binary versions
  • maybe add npx cypress install command to ensure the binary is there, even if the postinstall hook is not triggered by some reason
@bahmutov bahmutov self-assigned this Oct 8, 2019
@bahmutov
Copy link
Contributor Author

bahmutov commented Oct 8, 2019

Maybe link to https://github.com/bahmutov/yarn-cypress-cache as another example

@amirrustam
Copy link
Contributor

@bahmutov is this still valid?

@elvishuges
Copy link

elvishuges commented Aug 26, 2021

@amirrustam can you answer the solution to this problem? im getting the same erro in second time when i run CI process in gitlab.

@fchandebois
Copy link

Same for me @amirrustam & @elvishuges ? did you figured out this issue ? thanks ;)

@EMazzaglia
Copy link

EMazzaglia commented Nov 18, 2021

+1 here

Run npm run e2e

> [email protected] e2e
> cypress run --headless

The cypress npm package is installed, but the Cypress binary is missing.

We expected the binary to be installed here: /home/runner/.cache/Cypress/8.7.0/Cypress/Cypress

Reasons it may be missing:

- You're caching 'node_modules' but are not caching this path: /home/runner/.cache/Cypress
- You ran 'npm install' at an earlier build step but did not persist: /home/runner/.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

----------

Platform: linux (Ubuntu - 20.04)
Cypress Version: 8.7.0
npm ERR! code 1
npm ERR! path /home/runner/work/go-plus-pipeline/go-plus-pipeline
npm ERR! command failed
npm ERR! command sh -c cypress run --headless

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-11-18T15_30_28_539Z-debug.log
Error: Process completed with exit code 1.

@tecolotedev
Copy link

i'm getting the same error:
`Run cypress-io/github-action@v2
/usr/local/bin/npm ci

added 299 packages, and audited 300 packages in 12s

12 moderate severity vulnerabilities

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.
/usr/local/bin/npx cypress cache list
No cached binary versions were found.
/usr/local/bin/npx cypress verify
The cypress npm package is installed, but the Cypress binary is missing.

We expected the binary to be installed here: /home/runner/.cache/Cypress/6.9.1/Cypress/Cypress

Reasons it may be missing:

  • You're caching 'node_modules' but are not caching this path: /home/runner/.cache/Cypress
  • You ran 'npm install' at an earlier build step but did not persist: /home/runner/.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


Platform: linux (Ubuntu - 20.04)
Cypress Version: 6.9.1
Error: The process '/usr/local/bin/npx' failed with exit code 1
`

@MikeMcC399
Copy link
Contributor

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

No branches or pull requests

8 participants