-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 packages are installed unproperly #1641
Comments
@Daniel15 are there any known issues with |
I have installed scoop to @"%~dp0\C:\Users\r15ch\AppData\Local\Yarn\config\global\node_modules\.bin\http-server.cmd" %* |
It has something to do with I stumbled over this issue at the time I added the prefix to |
@r15ch13 - This is a known bug with |
It might be due to how cmd-shim is being invoked by Yarn. Does Scoop use symlinks? Perhaps Yarn is doing strange things with symlinks on Windows. |
@Daniel15 Yes the currently installed version is symlinked to |
I'm running into this issue as well. Typing Checking my path variable, the following are both present.
|
I have a similar issue but only while using git bash, in the cmd shell it seems to work. (Windows 10) MINGW64:
CMD:
|
Same issue here with Git Bash. Works fine in cmd and PowerShell.
I think this might be an issue with Git Bash rather than scoop though, since
However,
|
After digging around a bit more I think this is an issue with symlinks from scoop (
This could normally be fixed by setting the Not sure how to go about this. Editing the I guess the only 'good' workaround is to use |
I have a variant manifest of yarn: dorado/yarn.json, which doesn't change the location of (or persist) yarn's global bin, I think you should try it. Previously I suggested to keep yarn's original location of global bin in #1862, but it didn't accepted, so I create the variant one. |
Well, the last commit was 3 years ago. Do we still use this outdated package for Yarn? |
The correct path is now |
@DanielRuf Is this the same path that would be returned by |
This is the same, |
@DanielRuf Yes, I'm aware of that, but the last part of the path differs. The suffix I'm seeing to |
Should be the same. |
It's fixed in #3206 (Yarn 1.15.2), please update and try again. PS. the |
@niheaven this is still not fixed for me, it appears prefix still needs to be added or some yarn installs like azure-functions-core-tools still end up in %localappdata%. As the bucket has moved to its own repository I willl reopen the issue there. EDIT: PR Here: ScoopInstaller/Main#232 |
Executing a command in PowerShell can quickly set environment variables to alleviate this problem $env:PATH="$env:PATH;$env:LOCALAPPDATA\Yarn\bin"
[Environment]::SetEnvironmentVariable("PATH", "$env:PATH", "User") |
Yarn that was installed via Scoop doesn't install global packages properly.
TL;DR: Suggested hot fix workaround
If you are a Scoop user and want to fix the bug ASAP than you may add
%LOCALAPPDATA%\Yarn\config\global\node_modules\.bin
to yourPATH
environment variable.Test scenario:
I have Windows 10 desktop with fresh Scoop installed. After that:
The last command generated file
$env:HOMEPATH\scoop\apps\yarn\current\bin\http-server.cmd
.Scoop previously added this file's folder to
$env:PATH
.This file contains only 1 non-empty line:
The command
http-server
returns following output:Bug source
I've tried to find the bug reason. So I've edited the file and added 1 more
..\
right before AppData:The resulting file works.
The same issue is reproduced with any global Yarn package. We have to figure out if this a Scoop or Yarn issue.
The text was updated successfully, but these errors were encountered: