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

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

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

--

--

Staff front end engineer | Tech lead | Architect | charlesstover.com

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