Skip to content

Peer dep on Cypress - Cannot find module 'execa' #106

Closed
@badeball

Description

@badeball

Hi, everyone

In our CI environment, we've opted out of installing Cypress through NPM and rather use Docker images with it included. Hence, we have Cypress as an optional dependency (think optionalDependencies in package.json) and do npm install --no-optional.

This doesn't work quite well with @cypress/code-coverage. It doesn't look like it depends upon anything from cypress, but rather the transitive dependency execa. Hence, our suite fails with Error: Cannot find module 'execa' in CI.

Given that there is an official image with Cypress included, allowing us to not use NPM to install it, I am surprised that Cypress is a peer dependency here. Particularly because it's only used for the its dependency (execa).

Would you agree with this sentiment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions