Skip to content
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 global list shows nothing after upgrade from v1.3.2 to v1.5.1 using chocolatey #5444

Open
nyaapass opened this issue Mar 3, 2018 · 5 comments
Assignees
Labels

Comments

@nyaapass
Copy link

nyaapass commented Mar 3, 2018

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?

  • After I upgrade yarn from v1.3.2 to v1.5.1 using chocolatey, the yarn global list command shows nothing even if I have installed some global packages already (but I can still run those packages). But after I reinstall the v1.3.2 version, then yarn global list, all of the global packages shows back.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Install Chocolatey
  2. Install yarn 1.3.2 using chocolate: choco install yarn --version 1.3.2
  3. Install some global packages: yarn global add ionic
  4. yarn global list will be fine (list ionic package and its binaries)
  5. Upgrade yarn to 1.5.1 using choco: choco upgrade yarn
  6. yarn global list will show nothing
  7. Uninstall 1.5.1 then install 1.3.2 using choco: choco uninstall yarn && choco install yarn --version 1.3.2
  8. yarn global list will be fine

What is the expected behavior?

  • After upgrade from v1.3.2 to v1.5.1 using chocolatey, yarn global list should show all of the global package I have installed.

Please mention your node.js, yarn and operating system version.

  • node.js 9.7.1
  • yarn 1.3.2 and 1.5.1
  • Windows 7 SP1 64bit with all important updates installed
@ghost ghost assigned torifat Mar 3, 2018
@ghost ghost added the triaged label Mar 3, 2018
@sfleck
Copy link

sfleck commented Mar 3, 2018

The same is true after using the Windows installer on Win10 x64. yarn global is no longer referencing the AppData\Local\Yarn\config\global path. It appears to be pointing somewhere new.

Some more info - yarn global bin shows:

$ yarn global bin
C:\Users\<username>\AppData\Local\Yarn\bin

@gschafra
Copy link

gschafra commented Mar 9, 2018

Confirming the problem with the Windows installer.
Global packages seems to be moved from AppData\Local\Yarn\config\global\node_modules -> AppData\Local\Yarn\Data\global\node_modules. Previous (v1.3.2) packages are NOT migrated/moved to this new location on installing v1.5.1!

@lijunle
Copy link

lijunle commented Apr 12, 2018

@gschafra Awesome finding. I manually move the global folder and it seems OK now.

@htbkoo
Copy link

htbkoo commented Apr 28, 2018

@lijunle Thanks for the information! yarn global list does list out the packages after moving for me.
However, may I ask if you are still able to run the bin of those globally installed packages after moving?
(Not sure if it is the PATH environment variable)

Update: In the end I made a junction link as follow to solve the problem for me:
C:\Users<username>\AppData\Local\Yarn\Data>mklink /j global C:\Users\<username>\AppData\Local\Yarn\config\global

Would be great to know if there is a more proper way to fix it though.

@PaulLaux
Copy link

Confirm solution from @htbkoo as a temporary work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants