question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not exit with 0 when running with NODE_OPTIONS

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
beaugundersoncommented, Aug 21, 2018

On High Sierra cypress segfaults for me if NODE_OPTIONS=--max_old_space_size=4096 or if NODE_OPTIONS="".

I have to unset NODE_OPTIONS for cypress not to segfault.

Versions:

Cypress 3.1.0 macOS 10.13.6 node 10.8.0

1reaction
cypress-bot[bot]commented, May 17, 2019

Released in 3.3.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where do I set 'NODE_OPTIONS="--max-old-space-size=2048"'
My “npm run build” step executes webpack (Node 11.9.0) and would not honor the NODE_OPTIONS with any of the other suggestions here. Share....
Read more >
Command-line API | Node.js v19.3.0 Documentation
The file does not have a .cjs extension, and the nearest parent package.json ... the Node.js instance runs out of memory when max_count...
Read more >
A clean exit - Remy Sharp
Of course, if the node command is successful it'll exit with 0 and the || exit 0 does not run and is ignored....
Read more >
pkg - npm
Disclaimer: pkg was created for use within containers and is not ... --options bake v8 options into executable to run with them on...
Read more >
Jest CLI Options
Run only the tests that were specified with a pattern or filename: ... jest -o. Run tests related to path/to/fileA.js and path/to/fileB.js :....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found