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

Yarn Modern Plug'n'Play incompatibility with CT missing in docs #5394

Open
MikeMcC399 opened this issue Jul 24, 2023 · 3 comments
Open

Yarn Modern Plug'n'Play incompatibility with CT missing in docs #5394

MikeMcC399 opened this issue Jul 24, 2023 · 3 comments
Assignees

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jul 24, 2023

Subject

Guides > Component Testing

Description

Component testing does not work with Yarn Modern Plug'n'Play and there is no mention in the documentation about compatibility.

The Getting Started examples are all based on npm, e.g. Component Testing > React Component Testing > React Quickstart.

Yarn Modern Plug'n'Play is the default mode for new Yarn Modern installations (when .yarnrc.yml > nodeLinker is either undefined or set to pnp.)

Known open issues

Suggestion

Add new heading in one (or both) of the following to cover package manager compatibility:

"What package managers can be used with component testing?"

This should say that Yarn Modern Plug'n'Play does not currently work with Cypress component testing.

Steps to reproduce

git clone --branch yarn-berry-pnp https://github.com/MikeMcC399/component-testing-quickstart-apps
npm install yarn@latest -g
cd component-testing-quickstart-apps/react/my-awesome-app
yarn set version stable
yarn add cypress -D -E
yarn cypress run --component

Note that yarn install produces the warning message:

ESM support for PnP uses the experimental loader API and is therefore experimental

cc: @jordanpowell88

@MikeMcC399
Copy link
Contributor Author

Hi @jordanpowell88 / @marktnoonan

The Yarn blog notes the release of Yarn (Modern) 4.0 on October 23, 2023.

As expected, this hasn't changed any compatibility between Cypress and Yarn's default Plug'n'Play mode. There are still major issues.

If there are no immediate plans by the Cypress team to resolve these incompatibility issues, then it would make sense to acknowledge this in the Cypress documentation and guide users towards using the node-modules compatibility mode and away from the default pnp mode.

@MikeMcC399
Copy link
Contributor Author

When Yarn Modern is used in Plug'n'Play mode yarn install outputs the warning message:

ESM support for PnP uses the experimental loader API and is therefore experimental

It seems that this is the aspect of PnP which causes issues with Cypress.

image

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Feb 29, 2024

Hi @jordanpowell88 / @marktnoonan

Do you have any thoughts about this issue? It seems like the documentation ought to be more helpful about what works and doesn't work in terms of Yarn Modern and Cypress Component Testing.

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

5 participants