cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

Update Clear Cypress cache docs to be more actionable

Open jaffrepaul opened this issue 2 years ago • 0 comments

Subject

Guides

Description

The Cypress cache info doesn't include ‘npx’ (or a yarn equivalent) in the command. There are stack overflow posts about why this doesn't work.

There are also mentions of running cypress install as a follow up step in the docs and in the CLI output. Screen Shot 2022-02-16 at 12 51 51 PM

This assumes a user may have Cypress installed globally and could be misleading. But this error also displays with a global install: Screen Shot 2022-02-16 at 1 14 24 PM

==========

npx cypress cache clear would be the most universally reliable, since npx was introduced with npm 5.2.0 back in 2017, and Node 12.0.0 (our minimum spec) shipped with npm 6.9.0.

Also confusing, because the docs say “After running this command, you will need to run cypress install before running Cypress again.” and then show an example that does npm install and not cypress install. The code example should probably be updated to show npx cypress install.

Lastly, you should only need to run npx cypress install if you ran npx cypress cache clear after having already installed cypress with npm install cypress --save-dev or yarn add cypress --dev. If you haven’t yet installed cypress when you clear the cache, installing cypress normally should work without the need for a separate npx cypress install afterwards.

jaffrepaul avatar May 02 '22 15:05 jaffrepaul