Resolving Yarn2 + Cypress GitHub Action: Cannot find module ‘cypress’

An open issue exists for running the end-to-end test GitHub Action in a Yarn2 plug-and-play repository: the action fails with the following error:

Error: Cannot find module 'cypress'
Require stack:
- /home/runner/work/_actions/cypress-io/github-action/v2/dist/index.js

I dug into resolving this myself, and I found the root cause to be this line of the GitHub Action:

// If `command:` is provided, run it.
const customCommand = core.getInput('command')…




Staff front end engineer | Tech lead | Architect |

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Should we start using the term JavaScript developer for Front end roles?

Setup Bootstrap for React

3 🐈chy Open-Source Projects

Performance vs Readability

Going to School on Passing Props

school busses

Building a Serverless Contact Form

Serverless Computing

Podcast Episode 4: Validate Password Length

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Charles Stover

Charles Stover

Staff front end engineer | Tech lead | Architect |

More from Medium

Toggle Tab with Vanilla TypeScript and WAI-ARIA

Intercepting component state to ensure smooth animated transitions

Release note of egjs (Q4 2021)

JS/TS — add and remove eventlisteners properly without loosing the “this” context