Open DTHutton opened 4 years ago
Probably related behaviour that I currently struggle with. When running yarn install
(with all the relevant dependencies already installed) the screen just gets cleared, and then, when finished, returns to input ($), when done. If I scroll up, you can see the hidden yarn install v1.13.0
line that I would expect.
If some dependencies are not installed yet, installation output eventually starts appearing, so probably it's only the initial output that gets hidden, and is confusing.
This is what mine does. It does the same thing in the terminal for VSCode.
The only thing that you can do after that is ctrl + c
. Nothing else works until you close that instance out and open a new one.
Anyone got the solution on this?
Interestingly, I found that if I run winpty bash
in the terminal window, I get the same effect (without yarn
). So that seems to trigger it as well.
If anybody has any workarounds, I'm all ears. Do we even know which program is the issue?
It must be something that few bash doesn't recognize the yarn commands as @DTHutton is facing the same issue on VSCode and @mtiller you and me with GIT Bash. Just to continue my work, I'm using the IntelliJ IDEs Terminal.
Are we really the only four people in the world having this problem? I would have expected this issue to be lighting up the issue tracker. For what it is worth, this doesn't actually seem to be a yarn
issue directly. But yarn
seems to trigger these issues. I suspect something about it's tty support (colors? cursor movement?). I'm running the following on the machine that is giving me difficulties:
Git: version 2.27.0.window2.1 Yarn: 1.22.4 Windows: Windows 10 Pro - Version 1909
But the following nearly identical machine doesn't have the issue:
Git: version 2.27.0.window2.1 Yarn: 1.22.4 Windows: Windows 10 Pro - Version 1803
So it seems pretty clear that the issue is not with yarn
or git
or bash
per se, but rather something that changed from Windows 1803 to 1909. HTH.
One more thing I've found. If my console becomes non-responsive due to this random issue popping up with yarn
, I can run a command shell (cmd
) and then just exit and things seem to return to normal. But it is such a pain to do that intermittently. Furthermore, running yarn again may or may not trigger the thing. It is like a flip of a coin so you can potentially end up doing this multiple times. 😢
P.S. - I tried the new Windows Terminal. The issue still happens. So definitely not a UI issue, it is something fundamental to the shell itself.
Hi @mtiller , I know that's frustrating when it happens while working, I have moved on to windows powershell and nicely customized it. That's what we can do. Also added an option to open the exact folder by right click on windows to work and save time to traverse using cd . for ref: https://www.howtogeek.com/165268/how-to-add-open-powershell-here-to-the-context-menu-in-windows/
OK, on other thing I found as a terrible kludge. If you want to run a command with yarn
, you can do so reliable if you then pipe it to tee
, e.g., yarn install | tee /dev/null
. I know that is so stupid. But that makes yarn
completely reliable. It never messes up. Why? No idea. Seems like tee
would put out all the same characters as yarn
. But somehow it keeps my shell from losing the ability to output.
Cool, thanks!
We just bumped into this. cmd
works but Git BASH
and PowerShell
do not recognize yarn.
It looks like this might be a duplicate of #5349.
[]
Having a similar problem. Git bash doesn't seem to find yarn, but it works fine on cmd or powershell.
This is because of the Execution-policy of scripts. See: https://learn.microsoft.com/en-gb/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4 Set-ExecutionPolicy Unrestricted
Not this makes your system unsecure.
Replication Steps
yarn install
What is the current behavior? Literally nothing happens. No errors or messages of any kind and it goes right back to the default
$
line. Additionally, after attempting to run a yarn command of any kind, anything typed afterward doesn't show up. The only thing that works isctrl + C
, but all that does is go right back to the default$
line that I mentioned before with the same behaviors.What is the expected behavior? yarn should install dependencies or run scripts based on package.json file
Additional Info
yarn.cmd install
works in Bashnpx create-react-app my-app
will run and install using yarn with no issues, butyarn start
runs into the same issues as aboveyarn --version
, work in the default command prompt