Skip to content

Require nyc dep instead of obscure rangeerror #142

@jennifer-shehane

Description

@jennifer-shehane

I was trying to run a user's project and they just paste me their code, so I don't exactly look at everything that's required to run a dep necessarily. Their example was using @cypress/code-coverage.

Ok, so I paste in their code into my project and install @cypress/code-coverage. I do cypress open and am instantly hit with this error:

Screen Shot 2020-02-24 at 2 18 35 PM

Oh, cool, clearly this is required. Fine. Install, run then Cypress crashes with this error:

RangeError: Maximum call stack size exceeded at get (internal/bootstrap/pre_execution.js:286:8) at hasBinary (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/socket/node_modules/has-binary2/index.js:44:3) at hasBinary (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/socket/node_modules/has-binary2/index.js:58:59) at hasBinary (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/socket/node_modules/has-binary2/index.js:58:59) -- logs the hasBinary stack forever at hasBinary (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/socket/node_modules/has-binary2/index.js:37:11) at /Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/socket/node_modules/socket.io/lib/socket.js:385:13 at /Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/lib/socket.js:401:18 at tryCatcher (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/Users/jennifer/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:439:21) 

This sends me down the road of opening a bug with Cypress, I mean...afterall Cypress is crashing. (I thought this may be happening to this user as well, but I don't think so after seeing their nyc dep is installed: CrisisCleanup/crisiscleanup-3-web#194)

Obviously, npm logs this warning when I do npm i. Do I read these warnings? no. I do not.

Screen Shot 2020-02-24 at 2 21 58 PM

Is there any other way to make this error better when nyc is not installed as a peer dep?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions