question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress update instructions given say to update with npm, even if you're using yarn

See original GitHub issue

Current behavior:

When I open Cypress and there’s a new update, the update instructions tell me to use npm install --save-dev cypress@3.1.2 rather than saying yarn add --dev cypress@3.1.2.

Desired behavior:

If a yarn.lock file is detected instead of a package-lock.json file, the message should given you the yarn instructions.

The location of the update code is found at:

  • packages/desktop-gui/src/update/update-banner.jsx

The location of the code that tests the update banner:

  • integration/update_banner_spec.coffee

Steps to reproduce:

I assume you should be able install Cypress 3.1.1, run it with ``cypress open` and see the update button / with instructions.

Versions

  • 3.1.1

Operating System

Windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisbreidingcommented, Feb 20, 2019

The desktop-gui package is similar to a web app in a browser and doesn’t have access to the user’s file system. For that, it utilizes the server package.

For the update check, the desktop-gui sends an updater:check message, which is received here in the server and calls into Updater.check here. One possible solution is to check for the existence of yarn.lock in Updater.check and return with an isYarn: true|false property along with the new version.

Honestly, it might be better to just show both options in the dialog instead of trying to determine if the user is using yarn:

To update Cypress:

1. Quit this app

2. If using npm, run `npm install --save-dev cypress@3.1.5`
   
   If using yarn, run `yarn add cypress@3.1.5`

3. Run ...
0reactions
jennifer-shehanecommented, Mar 3, 2020

This issue will be closed to further comment as the exact issue here was resolved and tested.

If you’re experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Update Cypress Version - ProgramsBuzz
You can update Cypress to latest version using multiple techniques, you can update using NPM, using package.json and also using the yarn ......
Read more >
yarn upgrade
This command updates dependencies to their latest version based on the version ... When package names are specified, only those packages will be...
Read more >
Cypress failed to start on Windows - Stack Overflow
Tried opening Cypress using the prompt: node_modules.bin\cypress open but got the below message but there was no error listed. Has anyone come across...
Read more >
@cypress/github-action - npm
If yarn. lock file is found, the install uses yarn --frozen-lockfile command. Otherwise it expects to find package-lock. json and install using ......
Read more >
Yarn vs npm: Everything You Need to Know - SitePoint
Our Yarn vs npm comparison will help you decide which to use. ... with the help of a package manager we can install,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found