-
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
vite.config missing after CT onboarding - unexpected error #26849
Comments
I am going by the documentation Integrating with Cypress Component Testing which says:
It mentions "first class onboarding" and "scaffold the correct files" so I would expect it not to error out when started. Some other frameworks such as Angular, Create React App, and Vue.js have similar issues that prevent them from running due to missing config files that onboarding does not provide. |
I'm unsure what category this issue is in!
|
@MikeMcC399 I think that the app should definitely be helping out a bit more in this scenario. It should either tell you to run a vite project setup command or perhaps do it for you. Going to route for consideration for a fix. |
Current behavior
The Cypress desktop app shows the message "Unexpected error" if a default onboarding setup is followed after selecting Front-end framework
React.js
and bundlerVite
.No
vite.config.*
is found.Desired behavior
The Cypress desktop app should not throw any error after completing a default onboarding setup using Front-end framework
React.js
and bundlerVite
. A minimalvite.config.*
should be created by the onboarding process.Test code to reproduce
Execute in a terminal window:
mkdir cy-vite-ct cd cy-vite-ct git init npm init -y npm install cypress@latest -D -E npx cypress open
In the Cypress desktop app:
Click on "Component Testing"
Select Front-end framework
React.js
and BundlerVite
Click "Next step"
Copy and paste the command as instructed:
npm install -D vite react react-dom
You've successfully installed all required dependencies.
Click "Continue", click "Continue"
Note "Unexpected Error" looking for
vite.config.*
Cypress Version
First reported on Cypress
12.13.0
Continues to be reproducible on Cypress
13.15.0
Node version
18.17.1
&v20.17.0
Operating System
Ubuntu
22.04
(and Windows 11)Debug Logs
No response
Other
Workaround
Add a barebones
vite.config.js
file according to https://vitejs.dev/config/ and restartnpx cypress open
The text was updated successfully, but these errors were encountered: