-
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 throws "stdout is not a tty" in Git Bash #2591
Comments
same issue except on windows 10 and I used the installer |
Hmm strange. On Windows, I'd suggest installing using the installer (MSI file) or Chocolatey ( |
@Daniel15 As I mentioned above, I don't have administrator right for the Windows machine, thus I can't use the installer (MSI file) nor Chocolatey (which I also need admin rights to install). Currently this is preventing me from updating yarn at all. I was able to update yarn with the install script from 0.17 to 0.19.1 before. |
Also when I try to download the tarball from here: |
0.20 is a release candidate, 0.19 is the stable release.
Sent from my phone.
…On Feb 2, 2017 2:43 AM, "IgorAufricht" ***@***.***> wrote:
Also when I try to download the tarball from here:
https://yarnpkg.com/docs/install/#alternatives-tab
the link to latest package points to 0.19.1 instead of 0.20:
https://yarnpkg.com/latest.tar.gz
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2591 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHXCmi3RGHFy98cb9nKr-JFKb4M8Nks5rYbNjgaJpZM4LxpOE>
.
|
@Daniel15 Thanks, haven't noticed that. I found out the same error happens when I try to redirect output of any yarn command:
This is on version 0.20.0. |
Still happening with yarn 0.20.3. |
And with yarn 0.21.3. |
I just hit the same error in AppVeyor when trying to use Yarn within a shell script via Git Bash: https://ci.appveyor.com/project/kittens/yarn/build/1938/job/momtbo9wa2carunr. In my case, I could work around the issue by explicitly running # Workaround for https://github.com/yarnpkg/yarn/issues/2591
case "$(uname -s)" in
*CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;;
*) yarn=yarn;;
esac
eval $yarn run build |
…ng on Windows Git Bash
Also hitting this after installing yarn today and trying to run a shell script that invokes it. Node.js 6.9.1 on Windows 10, installed yarn 0.23.3 via the MSI. Thanks @Daniel15 for the |
@Daniel15 yarn init in git bash produces slightly different error message, but seems to be related Aliasing doesn't help
|
I get @betalb's error on Cygwin also, cannot do |
This is not a |
We can try introducing |
Yeah it really does seem like a Node.js issue... https://github.com/nodejs/node/wiki/Installation#building-on-cygwin I see that So while it's a workaround, I am now using yarn through winpty and exporting the required variable in my profile, although I might change it so that I just always run node through As a side thought, maybe it's worth bundling |
@ElvenSpellmaker thanks for the thoughtful note! It may be reasonable to bundle Maybe we can publish a "recommended solution" on our webpage instead? |
@BYK Bundling I reckon a note on the webpage might help, I still think a warning from within yarn itself would be a good thing, by checking the isTTY on Cygwin/Msys shells. |
@ElvenSpellmaker - I'm not completely sure about how to word this. Do you have time to open a PR to https://github.com/yarnpkg/website/ or may be provide a sample text? |
It is node that has hardcoded alias in gitbash. $ type node
node is aliased to 'winpty node.exe' so when you pipe something into node like $ echo "console.log('test')" | node
stdin is not a tty You'll get an error, but if you pipe to $ echo "console.log('test')" | /c/Program\ Files/nodejs/node.exe
test It works, I'll try to come up with a fix to this. |
I just tried the commands described on the website for alternative install and it worked without any problems now: $ curl -o- -L https://yarnpkg.com/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6875 0 6875 0 0 43193 0 --:--:-- --:--:-- --:--:-- 44934
Installing Yarn!
/c/Program Files (x86)/Yarn/bin/yarn
> Downloading tarball...
[1/2]: https://yarnpkg.com/latest.tar.gz --> /tmp/yarn.tar.gz.4sqWIGu1Fj
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 90 100 90 0 0 272 0 --:--:-- --:--:-- --:--:-- 277
100 608 0 608 0 0 581 0 --:--:-- 0:00:01 --:--:-- 593k
100 853k 100 853k 0 0 324k 0 0:00:02 0:00:02 --:--:-- 1153k
[2/2]: https://yarnpkg.com/latest.tar.gz.asc --> /tmp/yarn.tar.gz.4sqWIGu1Fj.asc
100 94 100 94 0 0 2970 0 --:--:-- --:--:-- --:--:-- 2970
100 612 0 612 0 0 2915 0 --:--:-- --:--:-- --:--:-- 2915
100 1028 100 1028 0 0 3125 0 --:--:-- --:--:-- --:--:-- 1003k
> Verifying integrity...
gpg: Signature made Sun, Sep 24, 2017 8:34:20 PM RDT using RSA key ID FD2497F5
gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
Subkey fingerprint: 6A01 0C51 6600 6599 AA17 F081 46C2 130D FD24 97F5
> GPG signature looks good
> Extracting to ~/.yarn...
> Adding to $PATH...
> We've added the following to your /c/Users/<username>/.bash_profile
> If this isn't the profile of your current shell then please add the following to your correct profile:
export PATH="$HOME/.yarn/bin:$PATH"
> Successfully installed Yarn 1.1.0! Please open another terminal where the `yarn` command will now be available.
$ |
If I run this then there is no problem:
I think that what ever problem there is its either either a bug in |
I guess this issue could be closed? |
@lanoxx - agreed, closing. |
... This is quite annoying but the publish with yarn fails because it tries to prompt the user event if lerna provides a version. Not clear how to solve this in travis env. Found this issue yarnpkg/yarn#2591 and it seems to be an issue with the environment. Whaterver the case using npm should fix the problem. I hope
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
I tried installing yarn using the installation script from https://yarnpkg.com/en/docs/install#alternatives-tab (I'm on Windows, but I don't have admin rights, so I can't use the Windows installer). After downloading the script it fails:
When I try to run the
install.sh
file directly, I get the same error:If the current behavior is a bug, please provide the steps to reproduce.
install.sh
file from https://yarnpkg.com/en/docs/install#alternatives-tabWhat is the expected behavior?
It should install successfully.
Please mention your node.js, yarn and operating system version.
node.js v6.3.0
yarn v0.19.1
Windows 7 x64
git version 2.11.0.windows.3
The text was updated successfully, but these errors were encountered: