Skip to content

Update Clear Cypress cache docs to be more actionable #4464

Open
@jaffrepaul

Description

@jaffrepaul

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions