-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary vs NPM .bin #6120
Comments
You should only need in include Cypress in your package.json ( You are not meant to run the binary directly as stated in the error message and instead should just need to run Also make sure you have not inadvertently downloaded 2 versions of Cypress #4595 Or if the install got interupted, this may result in an incomplete binary install which can cause this issue. So, clean your node_modules and reinstall. Run |
thanks, so when would I need the binary version? |
Hi @guyisra, If I may answer from my experiences. The cypress npm package is a wrapper for the actual binary which gets installed in ~/.cache in linux and C:\Users<user>\AppData\Local\Cypress\Cache in windows. But all we need to do for a proper install is 'yarn add cypress' OR 'npm install cypress' which will internally take care of installing the actual binaries to the corresponding cache folders and the npm wrapper binaries to the node_modules/cypress (and node_modules/.bin). Most probably, as @jennifer-shehane pointed, combining npm and yarn in the same project could have corrupted the installation (simply because they work in their own way when it comes to handling packages installation and operation). To start fresh, all we need to do is delete node_modules and package-lock.json and do a fresh yarn install (OR) npm install. |
Closing as resolved. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Doing
npm install
/yarn
on a package.json where cypress exists installs cypress and its binary to the node_modules/.bin folderBut when trying to
yarn cypress run
it says that the binary is not found/installed and need to doyarn cypress install
which then downloads the binary, unzips it and places it in~/.cache/3.8.1/Cypress
But then when running yarn cypress it outputs
Can you please clarify why I need both the downloaded binary and the npm binary and when I would use each?
The text was updated successfully, but these errors were encountered: