Closed jmargolisvt closed 5 years ago
Does it work after running cypress install
?
No it doesn't. The only way I've been able to get around it is to install it globally. Works for the day, but need to reinstall it all over again the next day.
@jmargolisvt what output do you get with cypress install
? What about cypress install --force
?
Both commands yield -bash: cypress: command not found
Again, it worked for the day yesterday when I globally installed, now it appears to be gone again today. Very strange.
@jmargolisvt just like any other node module, you'll have to execute cypress from the ./node_modules/.bin
directory. Can you try running:
./node_modules/.bin/cypress install
Yes, that will install cypress and it will work for the moment. Restart the computer, and it's gone again, back to the original error message.
@jmargolisvt it looks like Cypress was installed as a different user, ddcbethanyr
instead of jeff
. Which user did you expect Cypress to install for?
Sorry, mixed that up. They are both for the same user. It's my coworker that's having this issue (edited my first post).
@jmargolisvt ok, I would see if the entire /Users/ddcbethanyr/Library/Caches/
directory is being cleared on reboot.
It is not being cleared on reboot. Still plenty of stuff in there, just not Cypress.
@jmargolisvt so cypress cache exists before reboot, but is gone after?
That is correct.
@jmargolisvt well I'm not sure why that would be the case...can you check the permissions of the cypress cache folder after the binary is installed? for example with ls -lha
$ ls -lha
total 0
drwxr-xr-x 4 ddcbethanyr avdefs 128B Oct 17 13:16 .
drwx------+ 42 ddcbethanyr avdefs 1.3K Oct 17 14:44 ..
drwxr-xr-x 3 ddcbethanyr avdefs 96B Oct 17 12:54 3.1.0
drwx------@ 3 ddcbethanyr avdefs 96B Oct 17 13:16 cy
Anything look wrong here?
@jmargolisvt i'd compare that to other items in Library/Caches
, see if there's any obvious differences
I have the same permissions on my machine (which works correctly).
total 0
drwxr-xr-x 4 jmargolis MAN\Domain Users 128B Aug 20 13:21 .
drwx------+ 61 jmargolis MAN\Domain Users 1.9K Oct 15 15:00 ..
drwxr-xr-x 3 jmargolis MAN\Domain Users 96B Aug 20 13:14 3.1.0
drwx------@ 3 jmargolis MAN\Domain Users 96B Aug 20 13:21 cy
@jmargolisvt well, I don't know what Cypress can do about the binary disappearing...this is seemingly something very specific to your co-workers system. They can try exporting CYPRESS_CACHE_FOLDER
to somewhere else on their computer.
I have the same issue. I even changed the CYPRESS_CACHE_FOLDER to c:/ and is not working Any ideas?
Unfortunately we'll have to close this issue if no reproducible example is provided. Can anyone provide a way to reproduce this?
Hi there, I managed to install cypress and run the tests locally, but now I want to run the project and the terminal shows me cypress: command not found, don't know why! PLEASE, help!
Solved, I run it with the command
$(npm bin)/cypress run
Closing an unsolved issue is a cop out - even if you cannot reproduce it.
@hellfireSteve I see where you're coming from, however without a reproducible or further feedback on the issue, we can't be certain this actually is a problem with cypress.
We've been seeing this issue in CI for as long as we've been using cypress.
No version of Cypress is installed in: /var/lib/buildkite-agent/.cache/Cypress/3.1.0/Cypress
--
|
| Please reinstall Cypress by running: cypress install
| ----------
|
| Cypress executable not found at: /var/lib/buildkite-agent/.cache/Cypress/3.1.0/Cypress/Cypress
| ----------
|
| Platform: linux (Debian - 8.11)
| Cypress Version: 3.1.0
./node_modules/.bin/cypress install
doesn't fix the issue:
| Cypress 3.1.0 is already installed in /var/lib/buildkite-agent/.cache/Cypress/3.1.0
|
| Skipping installation:
|
| Pass the --force option if you'd like to reinstall anyway.
The directory exists but the binary is missing:
$ ls Cypress/
content_shell.pak icudtl.dat libffmpeg.so LICENSES.chromium.html locales natives_blob.bin resources version views_resources_200_percent.pak
Looking at this particular agent's history, I see that in an earlier run the job was killed part way through while running yarn install:
yarn install v1.13.0
--
| [1/4] Resolving packages...
| [2/4] Fetching packages...
| <lots of warnings>
| [4/4] Building fresh packages...
| # Received cancellation signal
| Error: The command was interrupted by a signal
Same exact experience on latest macOS Mojave. Been happening for a while. Install works - within a day or so - same error.
I am also having the same issue. I can run on my local mac, but when I push to the cloud I get:
No version of Cypress is installed in: /home/vcap/app/~/Library/Caches/Cypress/3.2.0/Cypress
I realize this issue is closed - I can open a new one if necessary. Looking for suggestions on how to resolve this issue.
I am also having the same issue. When I install it works fine for a day.. it disappears the next day.
Also experiencing this issue. Unable to run Cypress after rebooting or shutting off my computer on macOS Mojave
@dylanbromby @craig10 @pramoth001 @wsfuller If you're currently having this issue. Please provide:
Please also try to clear the Cypress cache and reinstall. As mentioned above, if an install process is killed partway through, it may have affected the cache directory.
@jennifer-shehane So it looks like the issue in my case is caused by running CleanMyMac X.
I can see the cache directory in HD/Users/~/Library/Caches/Cypress
when doing npm_install
. However running a system clean CleanMyMac will remove all files in this directory
I also run CleanMyMac X. I bet that's it.
I suspected it was some programming cleaning the cache :+1:
You can move the cache folder to somewhere else using https://docs.cypress.io/guides/getting-started/installing-cypress.html#Binary-cache
if you want to avoid it getting cleaned up. Maybe move it to ~/Cypress/cache
Nope, it's not about some cleaning, coz i'm using cypress on windows and don't use something like CleanMyMac, but have got the same problem after update to version 3.3.0. Actually cypress is open only time after installing, after reboot it's still open but when I tried to start test, cypress's closed and never running again before I reinstall it.
Same issue active - macOS 10.14.2
.
Unable to run Cypress after rebooting or shutting off my computer.
There's no "CleanMyMac X" or similar apps installed...
Having the same issue - macOS 10.14.5 Unable to run Cypress after rebooting or shutting off my computer.
Also having the same issue with macOS 10.14.5. However, I'm unable to run even without a reboot or shutting down. I also don't have Clean My Mac thingie either.
Having same issue with Windows 10 64bit
@ElderMorgun @moivica @garybfeefo @saddacracker @mikule1
Can you post the exact error messages you're getting? also if you want to be super helpful, run with debug
logs enabled:
MacOS/Linux
DEBUG=cypress* node_modules/.bin/cypress run
Windows:
set DEBUG=cypress*
node_modules/.bin/cypress run
I strongly suspect that the cypress installation is not atomic and when it fails part way through for any reason (laptop closed, OOM, network error, CI job killed, etc.) then it leaves a partial installation which is not handled correctly next time it tries to run. See https://github.com/cypress-io/cypress/issues/2610#issuecomment-480008905 Sorry, I don't have logs. We had to change our CI job to re-install cypress every time it runs in case the previous installation was corrupt.
Also, can we please reopen this issue? It seems like everyone is running into it.
Just ran into this with docker on cypress v3.4.1: Dockerfile:
FROM cypress/browsers:node12.6.0-chrome75 WORKDIR /code
ADD . /code
RUN npm install
CMD /bin/bash entrypoint.sh
entrypoint just runs 'cypress run --spec path/to/test/file.js'
output after building and running the image:
No version of Cypress is installed in: /root/.cache/Cypress/3.4.1/Cypress
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: /root/.cache/Cypress/3.4.1/Cypress/Cypress
----------
Platform: linux (Debian - 9.9)
Cypress Version: 3.4.1
@Bkucera this is what I get when I run your command on my Mac OS 10.14.5
cypress:cli cli starts with arguments ["/Users/j.cardwell/.nvm/versions/node/v10.15.0/bin/node","/Users/j.cardwell/apps/em-api/hospitality-admin/node_modules/.bin/cypress","run"] +0ms
cypress:cli NODE_OPTIONS is not set +0ms
cypress:cli program parsing arguments +4ms
cypress:cli running Cypress +0ms
cypress:cli parsed cli options {} +79ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +1ms
cypress:cli checking if executable exists /Users/j.cardwell/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/MacOS/Cypress +3ms
No version of Cypress is installed in: /Users/j.cardwell/Library/Caches/Cypress/3.4.1/Cypress.app
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: /Users/j.cardwell/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/MacOS/Cypress
----------
Platform: darwin (18.6.0)
Cypress Version: 3.4.1
@cameronc56 since the Cypress binary is installed during the postinstall phase, if you mount your project in a docker container and run npm install, and node_modules
is already present, then the postinstall hook will not run and the binary won't be installed. Possibly we should change the default behavior to install the binary instead of erroring
@saddacracker can you confirm the Cypress.app folder is located at /Users/j.cardwell/Library/Caches/Cypress/3.4.1/
? If not, the cypress postinstall script either didn't run, or your computer has cleaned up the binary from your cache folder. Does running ./node_modules/.bin/cypress install
fix it?
Please reopen this issue. I have the same issue on Ubunt 18.04.
When I run cypress open
from cypress/node_modules/.bin
, I get
Command 'cypress' not found, did you mean:
command 'cmpress' from deb infernal
Try: sudo apt install
After globally reinstalling cypress, it works. However, once I restart my machine, cypress cannot be found again.
@panimaya this issue is about the No version of Cypress is installed in:
error message, not the error you're getting. Please read https://docs.cypress.io/guides/getting-started/installing-cypress.html#npm-install for our guide on installing Cypress
@panimaya this issue is about the
No version of Cypress is installed in:
error message, not the error you're getting. Please read https://docs.cypress.io/guides/getting-started/installing-cypress.html#npm-install for our guide on installing Cypress
I have tried installing multiple times - after a shutdown, I keep getting the same error. While the error message is different, issue seems to be similar. I believe the users reporting this issue so far have been on Mac or Windows, while I am on Ubuntu.
Please let me know if you think this is still a completely different issue.
npm install --save-dev cypress
I had the same issue, and it was indeed my company anti virus or something of the sort that was deleting the .exe
file
This happens to me also
I solve the problem by reinstall the Cypress using the command
npm install cypress --save-dev
This might be happening because running the clear cache command so the Cypress installation not found
I can confirm, as @ashsepra said, just reinstalling it fixed the problem on my side:
Current behavior:
I've installed Cypress successfully, but when I try to run it with
cypress open
I get:Desired behavior:
cypress open
should open CypressSteps to reproduce:
npm i cypress
cypress open
Versions
Cypress 3.1.0 Node 8.12.0 OSX High Sierra