Cypress problems with node and cache

Viewed 2569

when I issue the command: npx cypress open

gives following error:

Cypress cannot run because this binary file does not have executable permissions here:

/Users/gianmarx/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/MacOS/Cypress

Reasons this may happen:

- node was installed as 'root' or with 'sudo'
- the cypress npm package as 'root' or with 'sudo'

Please check that you have the appropriate user permissions.

You can also try clearing the cache with 'cypress cache clear' and reinstalling.

----------

Platform: darwin (19.6.0)
Cypress Version: 5.4.0

I tried to install it but nothing always gives me this error.

if i try to clear the cache it doesn't work:

gianmarx@MBPdiGianmarco hoquLDesc % cypress cache clear
zsh: command not found: cypress
3 Answers

I believe that with these commands it can be solved:

cd ../gianmarx/Library/Caches/Cypress
cypress cache clear

Then go to your project where you have to start cypress and i should probably reinstall cypress. I recommend this command:

yarn add cypress faker --dev

then try to cast again:

npx cypress open

I got this error when I try to run cypress in a wrong file.

Make sure that you are located correctly on the cypress file, to solve this issue

I faced a similar issue, reinstalling cypress resolved the issue

$ npx cypress install --force

now you can open cypress

$ node_modules/.bin/cypress open
OR
$ npx cypress open
Related