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

Migrate away from Yarn 1 (Classic) as package manager #1423

Open
MikeMcC399 opened this issue Oct 30, 2023 · 4 comments
Open

Migrate away from Yarn 1 (Classic) as package manager #1423

MikeMcC399 opened this issue Oct 30, 2023 · 4 comments

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Oct 30, 2023

Feature

Migrate away from Yarn Classic v1 as package manager. This could be to Yarn Modern v4 or to npm.

Reason

Yarn 1 (Classic) is stated to be frozen. The Yarn 1 GitHub repo contains the "About" text:

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry"

The cypress-io/cypress-realworld-app should be based on current and supported technologies in order to provide a useful example of Cypress in practice.

@jennifer-shehane
Copy link
Member

Welcome to any PRs to update this

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jan 6, 2024

@jennifer-shehane

Related issues that @astone123 raised are:

See also

It may be difficult to migrate before these issues are addressed.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Feb 7, 2024

npm

Yarn Modern

  • After migrating from Yarn Classic to Yarn Modern (4.1.0) executing yarn dev crashes with

[start:api:watch] Error: Cannot find module '../src/aws-exports'
[start:api:watch] [nodemon] app crashed - waiting for file changes before starting...

@MikeMcC399
Copy link
Contributor Author

Yarn Modern

I revisited this and it seems that the issues were caused by the hierarchy of lifecycle scripts not executing as expected. The following set of commands, with a workaround, does however allow both E2E and Component Testing to work under Yarn 4.5.0:

yarn set version stable
yarn
yarn copy:mock:awsexports && yarn copy:mock:awsexportses5 # workaround for lifecycle script issues
yarn dev

Wait until message "Backend server running at http://localhost:3001" appears, then execute in a separate terminal:

yarn cypress:run
yarn cypress:run:component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants