-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
CT dependencies not detected with Yarn Plug'n'Play #26859
Comments
|
I made a reproduction of the same issue, and the dependencies are also not found if they're regular and not dev dependencies: https://github.com/slikts/cypress-yarn-pnp-repro |
Thanks for your comment! I will change the title of this issue so it is more general. I wrote "dev dependencies" because this is what Cypress recommends during installation e.g. I expect that the resolution will be the same whether the dependencies are installed as |
Thanks @MikeMcC399! There was an attempted fix for PnP support in Cypress v12.10.0 but unfortunately had to roll it back in v12.13.0 due to a different issue. This will likely be related to work needed to resolve #26865. I will forward this ticket to the appropriate team. They will evaluate the priority of this ticket and consider their capacity to pick it up. Please note that this does not guarantee that this issue will be resolved. The ticket will indicate any status changes. Thanks! |
I'm hitting up against this issue too.
|
Also facing this issue still, using Yarn 4 and Cypress 13.13.2 . |
|
Thank you for the update! Maybe we can generate some traffic on that issue 😄 |
The previous attempts are more than one year old. It would need a fresh look at the issue, possibly using different npm module(s). |
@MikeMcC399 unfortunately I can't say that I would try this out, I don't know anything about Cypress internals and would take a long time to figure out how things work. Who are the people that could fix something like this? I guess we need to get some attention of some folks like @mike-plummer, @jennifer-shehane , @ryanthemanuel and @emilyrohrbough (sorry, not intending to spam, just trying to get some attention on this unresolved issue 😅 - you are the chosen ones). |
|
Current behavior
If dev dependencies are installed using Yarn Plug'n'Play they are not detected in Component Testing mode. This is the default mode for Yarn Modern (version 2 and later), that is to say for a clean Yarn Modern installation, not an upgrade from Yarn Classic which retains the
node-modules
configuration.Desired behavior
Cypress should detect dev dependencies installed with Yarn Plug'n'Play and, in the case of the framework
Next.js
, Component Testing setup should continue and allow a new example spec to be created and successfully run.Test code to reproduce
Execute
select Component Testing
Select
Next.js
, click "Next step"Follow the instructions to copy and paste
yarn add -D next react react-dom
Note that the Cypress desktop app continues to display the spinner with the message "Waiting for you to install the dependencies..."
Do not click "Skip" and "Continue" otherwise this provokes another error.
Cypress Version
First reported on Cypress
12.13.0
Continues to be reproducible on Cypress
13.13.2
Node version
18.16.1
&v20.16.0
Yarn version
3.x
and4.4.0
Operating System
Ubuntu
22.04.4
(and Windows 11)Debug Logs
Other
For comparison, repeat the test with Next.js and CT using Yarn Modern configured for
node-modules
instead of the defaultpnp
.Pending implementation of Add support of Next.JS 14 #28185 useyarn add -D next@13 react react-dom
in the above.(don't use
yarn cypress open --component
)and
select Component Testing
Next.js
,is detected, click "Next step"Click "Continue", click "Continue"
Select Electron and "Start Component Testing in Electron"
Click "Create new spec"
Click "Create spec"
Click "Okay, run the spec"
Test is successful
Now change to
pnp
:yarn config set nodeLinker pnp yarn install yarn cypress open
and
select Component Testing
The text was updated successfully, but these errors were encountered: