Description
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 bundler Vite
.
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 bundler Vite
. A minimal vite.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 Bundler Vite
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 a file named vite.config.*
(Cypress 13.16.1 is not compatible with vite@6 and react@19, so steps to reproduce do not currently work exactly.)
Cypress Version
First reported on Cypress 12.13.0
Continues to be reproducible on Cypress 14.0.3
Node version
18.17.1
, v20.18.0
v22.14.0
Operating System
- Ubuntu
22.04
- Ubuntu
24.04.2
LTS - Windows 11
Debug Logs
No response
Other
Workaround
Add a barebones vite.config.js
file according to https://vitejs.dev/config/ and restart npx cypress open
// vite.config.js
export default {
// config options
}
Activity