cypress: Failure to start Cypress on a fresh install nvm
Current behavior:
I installed cypress given the npm installation guide using the latest Node.js and npm versions (Node is running under nvm). I got the following error which is guiding me to install dependencies:
It looks like this is your first time using Cypress: 3.1.4
✖ Verifying Cypress can run /Users/benjamin/Library/Caches/Cypress/3.1.4/Cypress.app
→ Cypress Version: 3.1.4
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
/Users/benjamin/Library/Caches/Cypress/3.1.4/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/benjamin/Library/Caches/Cypress/3.1.4/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=22
----------
Platform: darwin (18.0.0)
Cypress Version: 3.1.4
Desired behavior:
Cypress should woprk.
Steps to reproduce: (app code and test code)
benjamin@Benjamins-MacBook-Pro Desktop $ create-react-app cypress-demo
benjamin@Benjamins-MacBook-Pro Desktop $ cd cypress-demo
benjamin@Benjamins-MacBook-Pro cypress-demo (master) $ npm i cypress
benjamin@Benjamins-MacBook-Pro cypress-demo (master) $ npx cypress open
Versions
Platform: darwin (18.0.0) Cypress Version: 3.1.4
I can try to investigate and contribute a patch if interested - though I was pretty surprised when such a simple setup failed 😕
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 40 (11 by maintainers)
Commits related to this issue
- initial commit — committed to shairez/cypress-clock-timeout-issue by shairez 2 years ago
Unfortunately we have to close this issue as there is not enough information to reproduce the problem.
Please try unsetting the
NODE_OPTIONSenvironment variable if you have this set - as this causes Cypress to crash. This is due to an Electron bug prior to version 2.0.3, where havingNODE_OPTIONSset causes either a failure or arguments to be ignored. https://github.com/electron/electron/issues/12695#issuecomment-385826834To see all environment variables currently set
MacOS / Linux
Windows
To unset
NODE_OPTIONSenvironment variableMacOS / Linux
Windows
We have open issues for this being fixed that you can follow here:
NODE_OPTIONSshould not exit0: https://github.com/cypress-io/cypress/issues/1676 - to be released in Cypress 3.3.0The problem reproduces pretty easily for me and I have offered to provide whatever additional information you might want for about 5 months now.
During those 5 months you have continuously said that there is not enough information (rather then tell me what the extra information you want is).
If we responded this way in Node.js to a bug report - there would be outrage.
I warmly recommend you consider a better approach to potential contributors.
That said - whatever works for you - good luck with the project.
You just changed
stage: needs informationtostage: awaiting responsealthough I have provided all that information. To me this indicates I have not been communicating well.I really don’t want to come off as aggressive or annoying.
I’m fine with any of “we’re looking into the issue”, “I’m not able to reproduce can you help me isolate” “I’d like to take you up on your offer to look into it” or “we don’t support running cypress with an nvm environment” 😃
How can I help move this forward?
People are still having this issue and I keep getting pings so I’m going to go ahead and unsubscribe. If you change your mind about fixing this or getting a repro you can find my email info at the node.js github repo home page.
Doing
unset NODE_OPTIONSworked for me as well. Thank you @paqman and @jennifer-shehane !We are running against a similar issue where cypress does not run when an environment variable is set. In our case it is
NODE_OPTIONS.Running the same command with
NODE_OPTIONSwill break.@rdig Doesn’t make a difference whether DISPLAY is set to :1.5 or if I
unsetit before I run it.EDIT: Looks like sudo makes a difference - and it works! Although I’m not sure why sudo would be necessary, and it would be handy if cypress actually showed which file it was failing to use in it’s non-elevated state.
@rdig I have seen unsetting the
DISPLAYas a solution to other issues on install like here: https://github.com/cypress-io/cypress/issues/1556#issuecomment-418069209 but not everyone, need to narrow down what this issue is.