I have just upgraded Cypress using npm install cypress -D and got the below error
up to date, audited 775 packages in 1s
18 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
PS C:\Repositories\XXX-testautomation> npx cypress open
It looks like this is your first time using Cypress: 7.2.0
× Verifying Cypress can run C:\Users\<UN>\AppData\Local\Cypress\Cache\7.2.0\Cypress
→ Cypress Version: 7.2.0
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
Platform: win32 (10.0.19042)
Cypress Version: 7.2.0
But when I perform force install, I am able to see the confirmation that the install was successful and I was able to open cypress without any issues.
npx cypress install --force
Cypress 7.2.0 is installed in C:\Users\<UN>\AppData\Local\Cypress\Cache\7.2.0
Installing Cypress (version: 7.2.0)
√ Downloaded Cypress
√ Unzipped Cypress
√ Finished Installation C:\Users\<UN>\AppData\Local\Cypress\Cache\7.2.0
You can now open Cypress by running: node_modules\.bin\cypress open
https://on.cypress.io/installing-cypress
PS C:\Repositories\xxx-testautomation> npx cypress open
It looks like this is your first time using Cypress: 7.2.0
√ Verified Cypress! C:\Users\<UN>\AppData\Local\Cypress\Cache\7.2.0\Cypress
Opening Cypress...
Can someone explain why it always needs a --force command?