cypress: Do not exit with 0 when running with NODE_OPTIONS
bug
When using NODE_OPTIONS=--max_old_space_size=4096 Cypress run through CLI silently fails but the exit code is 0.
- why is this option affecting the run?
- why don’t we exit with 1?
- why don’t we print the problem?
$ NODE_OPTIONS=--max_old_space_size=4096 DEBUG=cypress:* npm run cypress:open
> cypress-test-tiny@1.0.0 cypress:open /Users/gleb/git/cypress-test-tiny
> cypress open
cypress:cli cli starts with arguments ["/Users/gleb/.nvm/versions/node/v8.9.4/bin/node","/Users/gleb/git/cypress-test-tiny/node_modules/.bin/cypress","open"] +0ms
cypress:cli program parsing arguments +3ms
cypress:cli opening Cypress +1ms
cypress:cli parsed cli options {} +129ms
cypress:cli opening from options {"project":"/Users/gleb/git/cypress-test-tiny"} +0ms
cypress:cli command line arguments ["--project","/Users/gleb/git/cypress-test-tiny"] +1ms
cypress:cli verifying Cypress app +0ms
cypress:cli path to info.json file /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/info.json +0ms
cypress:cli { version: '2.1.0', verifiedVersion: '2.1.0' } +16ms
cypress:cli installed version is 2.1.0 comparing to 2.1.0 +17ms
cypress:cli checking if executable exists /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/Cypress.app/Contents/MacOS/Cypress +0ms
cypress:cli path to info.json file /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/info.json +2ms
cypress:cli has verified version 2.1.0 +2ms
cypress:cli run verification check? false +0ms
cypress:cli needs XVFB? false +0ms
cypress:cli spawning Cypress /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/Cypress.app/Contents/MacOS/Cypress +0ms
cypress:cli spawn args ["--project","/Users/gleb/git/cypress-test-tiny","--cwd","/Users/gleb/git/cypress-test-tiny"] { dev: undefined, detached: false, stdio: 'inherit' } +0ms
~/git/cypress-test-tiny on master
$ echo $?
0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 18 (10 by maintainers)
On High Sierra cypress segfaults for me if
NODE_OPTIONS=--max_old_space_size=4096or ifNODE_OPTIONS="".I have to
unset NODE_OPTIONSfor cypress not to segfault.Versions:
Cypress 3.1.0 macOS 10.13.6 node 10.8.0
Just got the same error on the latest Cypress version. I tried to unset
NODE_OPTIONS, but it didn’t help much. How do I solve this problem?Update: After a few attempts of re-installing, I was able to launch successfully it.
Released in
3.3.0.I also was able to start cypress again by unsetting the environment variable,
Node: 8.11.3 Darwin: 17.6.0 Cypress: 3.1.0
Pasting the error code so others may find this via google search.