-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn self-update should update using the same installation method originally used #1139
Comments
Do you want to close this since |
No, the plan is to reinstate a version of self-update that uses the right
installation method.
Sent from my phone.
On Dec 7, 2016 2:04 AM, "Scott Busche" <notifications@github.com> wrote:
Do you want to close this since self-update was removed with #1429
<#1429>?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHdMyShESFRQIiqAJhZEWI_HgajUoks5rFXmNgaJpZM4KYOBW>
.
|
https://yarnpkg.com/en/docs/cli/self-update should probably be removed/updated |
If I'm on 0.18.1, how do I update to the next version? |
@meta-meta Currently, you need to manually upgrade. |
how about |
I'm a big fan of Yarn but am a little concerned at how self-update was removed with no deprecation notice, no mention in the release notes, and that it was bundled in with a PR that is largely unrelated and where there was no discussion about removing self-update. I understand that it is early days for Yarn and that API changes are to be expected but it would be good if there was a process for removing core functionality. (sorry if this isn't the right place to discuss, but this PR is where the docs link to) |
Installing Yarn via Yarn is not a supported use case at the moment, and can cause several issues. We don't recommend it at the moment. @dancoates - The self-update command never really worked 100% correctly, that PR just removed the remnants of the existing command while adding some framework stuff for the new self-update (which will come in the future, as per this issue) |
How can I manually update yarn? Not sure about that one, I used brew on my mac to get it working but not sure what "manual" means here... any tips appreciated. |
Upgrade it the same way you upgrade any other app installed using Homebrew.
I assume it has an "upgrade" command.
Sent from my phone.
On Jan 26, 2017 9:11 AM, "Cato" <notifications@github.com> wrote:
How can I manually update yarn? Not sure about that one, I used brew on my
mac to get it working but not sure what "manual" means here... any tips
appreciated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHSm1RTv0bZMHtPxkWkS01hPl5Rm3ks5rWNPJgaJpZM4KYOBW>
.
|
@CatinhoCR I initially installed yarn using npm, so I did |
|
You might install yarn width homebrew.So |
Sadly,
|
npm sometimes has weird issues which is why we don't recommend using it to install Yarn. |
@wardbell Simply running install works, too:
No need to uninstall first. |
Sorry to interrupt 😉 Have you considered simply delegating this to npm (assuming of course yarn runs if npm exists in the first place).
The nice thing is that if it does not work out you can always:
|
@SMotaal There's a few issues with that:
|
if your system is Windows and had installed npm ,you can use |
I can't remember how I set it up on this mac roughly a year ago, I know I was using something other than NPM at one point, but when I lost my thread I simply NPMed and I have no issues other than yarn complaining when I'm fairly behind which reminds me to update and I simply From a user's perspective, I think yarn can recommend "supported" and maybe mention "unofficial" where if "unofficial" and it does not "work as intended" please use "supported" to install and here is "recommended" if you need to undo "unofficial" Honestly, it is important for a package manager to have a clear path for itself to be well-managed. |
@onurtemizkan are you still working on this? |
Are there any updates? |
For those just wanting to update yarn automatically on windows, without having to download the binary, I've been using |
No sorry, chocolatey is just horrible. |
If you don't like Chocolatey, don't use it.
I think it's pretty good though. At work we have a lot of internal
Chocolatey packages for various software packages. Seems to work well.
In any case, this issue is specifically for reimplementing self update in
Yarn. It'll only use Chocolatey if that's what you originally used! If you
used the installer directly, upgrades would also use the installer
directly. So it won't force you to use Chocolatey.
Sent from my phone.
…On Fri, Apr 20, 2018, 8:25 AM Benjamin Staneck ***@***.***> wrote:
No sorry, chocolatey is just horrible.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHRZ-MoIxY2rwVGVHWCqXEPQRAlKHks5tqPKggaJpZM4KYOBW>
.
|
Scoop is an alternative to Chocolatey and works a lot like brew. |
Yarn just told me my yarn version was out of date and asked me to update to the latest yarn version. However, it’s recommendation - a curl & bash command - makes me a little uncomfortable. Wouldn’t this command be effectively the replacement for the need to curl & pipe to bash to upgrade yarn? Would this command act as yarn’s main & frequent upgrade method? |
This is a pretty poor experience for new users:
|
It's kinda crazy how this still isn't fixed. After more than a year, I think my solution (here) is still the cleanest there is (even though it's tedious and annoying). |
We should collaborate to get a command in place for this! The hard work of the installer is already done, it's a matter of packaging up the replace and run into a yarn command. |
still not working?! |
I'll summarize my solution above again here:
Finally, run |
If anyone wants to work on this... We actually already have code that determines the command that needs to be ran to upgrade Yarn: You'd just need to add a "self-upgrade" command that runs the correct command. |
@Daniel15 I've submitted a pull request for this, looking forward for some feedback. Thanks. |
This works for me:
|
Any news on this? |
@crmpicco For now, you still need to update manually. |
It seems that So, I'm not sure what that would mean if you want to uninstall yarn, though. 🤔 |
There is an Upgrade Yarn section in the docs: https://yarnpkg.com/en/docs/install |
@ilias-t this is not about updating, but rather using the same installation method to update. |
This issue is over 2yrs old, seems like you don't care. Just remove the command, it's not working & misleading. |
This command doesn't exist so it'll be hard to remove 🙂 As far as I'm concerned, I believe the original intent of this issue is fixed with |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
yarn self-update
always downloads a tarball.What is the expected behavior?
yarn self-update
should update using the same installation method used by the user. For example, if Yarn was installed via the Debian/Ubuntu package,yarn self-update
should runsudo apt-get update && sudo apt-get install yarn
. On Windows when installed via the installer, it should downloadhttps://yarnpkg.com/latest.msi
and execute it.This is closely related to #1138 ("add yarn version check on startup") in that both issues need some way of determining the installation method used by the user.
The text was updated successfully, but these errors were encountered: