Reputation: 521
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!
Upvotes: 2
Views: 11450
Reputation: 895
this is for windows, sorry if its a wrong place, but i came to this topic while searching for solution:
in order to use cypress, i have downloaded a zip and placed it in c:\Projects\cypress.zip, .npmrc has this: CYPRESS_INSTALL_BINARY=C:\Projects\cypress\cypress.zip, npm install didnt did the trick, and this thing did: node_modules.bin\cypress install, and than: node_modules.bin\cypress run or npm run cy:open, it really depends where from its ran.
Upvotes: 0
Reputation: 1422
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"
Upvotes: 0
Reputation: 1695
If you installed cypress through npm i.e npm install cypress, then follow the instructions displayed after a complete installation. Which in my case said, You can now open Cypress by running: node_modules/.bin/cypress open. This command should be run if you are running Cypress for the first time, whereby Cypress will create and Verify its location in ~/Library/Caches/Cypress/6.2.0/Cypress.app path. Then you will be able to open it again by running npx cypress open command in the terminal. Otherwise, download and install the desktop version from here.
Upvotes: -1
Reputation: 3069
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.
Upvotes: 3
Reputation: 49
your npx command trying to run from the root. Try using from nodemodules of the current project.
/node_modules/.bin/cypress run
This will open and run the cypress. Let me know still you are facing issues.
Upvotes: 1