'I can't open Cypress on Mac: Cypress not found
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
Solution 1:[1]
I tried the following command on my Mac and it worked:
npx cypress open
Solution 2:[2]
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.
Solution 3:[3]
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
Solution 4:[4]
npx cypress install worked for me
Solution 5:[5]
Try to run
npm install
then try to run it again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | shreyasm-dev |
| Solution 2 | Mr. J. |
| Solution 3 | Iqra. |
| Solution 4 | Kostas Minaidis |
| Solution 5 | Dharma Krish |
