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

Launchpad CT onboarding dependencies screen not always reliable #25782

Closed
lmiller1990 opened this issue Feb 13, 2023 · 2 comments · Fixed by #26033
Closed

Launchpad CT onboarding dependencies screen not always reliable #25782

lmiller1990 opened this issue Feb 13, 2023 · 2 comments · Fixed by #26033
Assignees
Labels
CT Issue related to component testing

Comments

@lmiller1990
Copy link
Contributor

Current behavior

When doing the onboarding for CT, sometimes it claims you are missing a dependency, when you are not. Eg in this example I have both Solid.js and Vite Plugin Solid, but it says I don't:

image

Problem is here: https://github.com/cypress-io/cypress/blob/develop/packages/scaffold-config/src/frameworks.ts#L26-L28

Error:

cypress:scaffold-config:frameworks error when detecting solid-js: Package subpath './package.json' is not defined by "exports" in /Users/lachlanmiller/code/dump/my-solid-app/node_modules/solid-js/package.json 

While it is possible to fix, eg like this, we need to have an alternative strategy that does not rely on package.json getting added to the export map for every module on npm.

Desired behavior

Correctly find and determine the module and version.

Test code to reproduce

The easiest way to reproduce would be

yarn create vite my-app --template react

cd into node_modules/react, remove package.json from the exports key in package.json.

Do the Cypress setup and observe it does not detect that you have React installed.

Cypress Version

12

Node version

16

Operating System

Linux, macos

Debug Logs

cypress:scaffold-config:frameworks error when detecting solid-js: Package subpath './package.json' is not defined by "exports" in /Users/lachlanmiller/code/dump/my-solid-app/node_modules/solid-js/package.json 


### Other

_No response_
@lmiller1990 lmiller1990 added the CT Issue related to component testing label Feb 24, 2023
@lmiller1990
Copy link
Contributor Author

lmiller1990 commented Feb 28, 2023

Hey team! Please add your planning poker estimate with Zenhub @astone123 @marktnoonan @mike-plummer @warrensplayer @ZachJW34

Sorry about the late estimate. I thought I'd send the notification out.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 14, 2023

Released in 12.8.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.8.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CT Issue related to component testing
Projects
None yet
2 participants