Cypress Component Testing is not running in a new Vite+React+TypeScript project
See original GitHub issueCurrent behavior
Hi Cypress Team!
First off, thanks for making a great tool. I’ve been using Cypress for awhile and I just wanted to take the briefest of moments to appreciate the work you’ve done.
My issue is related specifically to Cypress Component Testing. I am adding Cypress Component Testing to a project that uses Vite+React+TypeScript. After setting up the project with the standard settings from Vite’s React-TS template, adding Cypress, and running the automated configuration to set up component testing and running the new test, the Cypress app freezes on the “Your tests are loading…” screen.
Desired behavior
When I start the newly created test, the test should load and show the default <App />
component I am rendering with cy.mount
in the test.
Test code to reproduce
I’ve set up a repo to replicate the issue. I’m using Cypress Component Testing in a little different context, but I distilled the issue down to a minimum reproducible example found here: https://github.com/jude-lawson/cy_vite_repro
The steps to reproduce are in the repo’s README!
Cypress Version
10.4.0
Other
I’ve reached out for help on the Cypress Discord and was directed here to get some additional help. As mentioned before I am trying to use Cypress Component Testing in a little different context (a monorepo), but the isolated workspace is still a brand new Vite+React+TS project, just like the minimum reproducible example (which is not a monorepo).
I’m using pnpm
, but I’ve also tried this with npm
as well just to eliminate pnpm
as a variable and the issue still occurred.
Thanks for any help you can provide, and please let me know if there are any other steps I can take or additional information that I can provide.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (2 by maintainers)
Top GitHub Comments
I’m going to close this issue since we have merged #23048 which will be included in our next release. If you are seeing an error that isn’t related to Vite hanging due to node version >=17, we can reopen or you can create another issue!
Awesome, thanks everyone who looked in to this and helped provide workarounds. Looking forward to the next release, and thanks for building great software 🎉
Also, this is a complete side note, but Cypress’s documentation is some of the best I’ve ever utilized, and I often point to it as an archetype of great documentation. Thank you for writing useful documentation as well!