-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
npm i -D cypress
fails with error
#29204
Comments
@Mlocik97 This appears to be an issue with npm installing. I'm not sure what we could do in this situation. Maybe try updating npm? |
Your log is showing a failure installing the Cypress binary for Node.js Please check your version of npm: npm --version You may also want to install the latest Node.js The following command works without any issue on Ubuntu npm install cypress --save-dev You can get additional debug information if you split the installation into Cypress npm module and Cypress binary in two steps: npm install cypress@latest --save-dev --ignore-scripts
export DEBUG=cypress:*
npx cypress install |
Fails even with newer version of NPM.... But when I used
|
Do you want to close this issue now that you have Cypress installed? It's possible that your previous installation attempt of Cypress with mismatched Node.js / npm versions could have left a partially installed version of Cypress which could not recover without deleting the intermediate contents. |
I am also having this problem. Ubuntu: 22.04.3 LTS Here is the install log (and error):
|
You could try: npx cypress cache clear
npm ci --foreground-scripts
npx cypress verify If that doesn't work, I suggest you open a new issue as your issue concerns a different environment. |
Yarn, for some reason, worked fine. Your code produces the more likely reason (?): Apparently Xvfb was not installed. Edit: Yep, that was it. Xvfb wasn't installed; npm works fine now. Thank you. |
You had two different problems and to find out the original reason you would have needed to run with Good to hear that it's now working anyway. 👍🏻 |
This issue should be closed as the original poster already confirmed that their installation was successful. |
In the meantime it has surfaced that installing Cypress fails using npm on Ubuntu, when Node.js has been installed using snap. You can work around this with npm install cypress --save-dev --foreground-scripts I would however suggest to avoid snap and use one of the (other) package managers listed by Node.js. |
Oh, good to know that... I installed node.js via snap, so I guess that's it. Btw. Snap is listed in that package managers list you sent. Also I had issues installing it from nodesource as .deb. For some reason I either had conflict or only node 8 worked, which is too old and unsupported by most frameworks. |
Thanks for pointing that out! I added "(other)" into my sentence. |
Current behavior
Debug logs
Cypress Version
@latest
Node version
v18.19.1
Package Manager
npm
Package Manager Version
8.3.0
Operating system
Linux
Operating System Version
Ubuntu 20.04.6 LTS
Other
No response
The text was updated successfully, but these errors were encountered: