Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cypress cache list and verify using wrong Cypress version for Yarn Modern pnp #971

Open
MikeMcC399 opened this issue Jul 18, 2023 · 1 comment
Labels
type: enhancement New feature or request

Comments

@MikeMcC399
Copy link
Collaborator

This issue refers to github-action usage with Yarn Modern Plug'n'Play (pnp).

Current behavior

When .github/workflows/example-yarn-modern-pnp.yml is run, it shows npx being called and not finding the installed version of cypress.

For example job 4959218510 shows:

/usr/local/bin/npx cypress cache list
npm WARN exec The following package was not found and will be installed: [email protected]
┌─────────┬───────────────────┐
│ version │ last used         │
├─────────┼───────────────────┤
│ 12.11.0 │ a few seconds ago │
├─────────┼───────────────────┤
│ 12.12.0 │ 3 days ago        │
└─────────┴───────────────────┘
/usr/local/bin/npx cypress verify

(Also reproducible with later versions.)

With Yarn Plug'n'Play there is no directory node_modules set up and therefore npx cannot find cypress and it installs instead the latest version, which may or may not correspond to the version specified in yarn.lock.

On a local machine, or a CI workflow which preserves the npm-cache/_npx cache, a previously installed version of Cypress may also be used.

Desired behavior

When Yarn Plug'n'Play is in use, then cache list and verify should use the installed version of Cypress (from yarn.lock) and not install a different version.

Suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant