Question: I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a angular project on npm.

Help!

Answer: 
Set `CYPRESS_CACHE_FOLDER` environment variable.

Ex on Linux:

```
export CYPRESS_CACHE_FOLDER=/custom_path/cypress

```

When you install `Cypress` it's caching some binaries and stuff. Usually, for a regular user, default cache locations are as follows.

```
MacOS: ~/Library/Caches/Cypress
Linux: ~/.cache/Cypress
Windows: /AppData/Local/Cypress/Cache

```

When `CYPRESS_CACHE_FOLDER` env variable is set Cypress resources will be cached to that location and when running, Cypress will find stuff there. Make sure the user has access to the cache location.
Perhaps late answer, but still:

I had this errors mostly because of the version mismatch between docker image specified in Dockerfile or docker run command: `cypress/included:8.4.0` and cypress version in project package.json which was `"cypress": "8.3.0"`