Reputation: 1547
I've checked through the answers on S.O and so far none have worked for me.
I put my question in a video. Watch it here
What went wrong? It was working fine yesterday?
What I've done so far:
Re installed cypress
tried to open with : .node_modules\.bin\cypress open
then tried: npx cypress open
Got the following message
No version of Cypress is installed in: /Users/jacquelinegeorge/Library/Caches/Cypress/3.4.0/Cypress.app
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: /Users/my_name/Library/Caches/Cypress/3.4.0/Cypress.app/Contents/MacOS/Cypress
----------
Platform: darwin (18.7.0)
Cypress Version: 3.4.0
Upvotes: 16
Views: 38841
Reputation: 51
If you want to clear the cypress cache - for whatever reasons - you have to run the command:
npx cypress cache clear
But you must have cypress install to be able to do this command:
npm install cypress --save-dev
If you run the cache clear command then you will have to rerun the following command:
npx cypress install
You will find the details here: clear cypress cache
Upvotes: 4
Reputation: 2740
In mac, if you have it installed in your project, you can use something like
./node_modules/cypress/bin/cypress run --spec path/to/file/address
Upvotes: 0
Reputation: 1
maybe too late but i think you should try this:
1 - ./node_modules/.bin/cypress install
2 - ./node_modules/.bin/cypress open
and then it will open cypress for you
Upvotes: 0
Reputation: 267
I tried the following command on my Mac and it worked:
npx cypress open
Upvotes: 22
Reputation: 763
This is correct and logical. In your case, on macOS, You are not installing cypress globally or adding its path in the path variable either. Therefore, if you will write cypress run
it will not work and you would have to give the reference that from where it should pick it. i.e.
./node_modules/.bin/cypress open
Upvotes: 3
Reputation: 3721
I've been trying what you are using and experimented a bit:
./node_modules/.bin/cypress open
works fine by me (note the forward slashes instead of the backward slashes)
.node_modules/.bin/cypress open
does not work for me (note that this is the command you use in the video, but with the replaces slashes). In your question on stackoverflow you use an extra /
before the node_modules, but in your video you don't.
What also should be a possibility is opening cypress via the OSX Launcher and then selecting the automation directory.
Upvotes: 5