Do you want to request a _feature_ or report a _bug_?
Bug
What is the current behavior?
12:50 $ yarn init
yarn init v0.15.1
error Can't answer a question unless a user TTY
at ConsoleReporter.question (C:\Program Files (x86)\Yarn\lib\reporters\console\console-reporter.js:189:29)
at Object.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli\commands\init.js:91:38)
at next (native)
at step (C:\Program Files (x86)\Yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
at C:\Program Files (x86)\Yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:20
at process._tickCallback (internal/process/next_tick.js:103:7)
info Visit http://yarnpkg.com/en/docs/cli/init for documentation about this command.
If the current behavior is a bug, please provide the steps to reproduce.
Run yarn init in the Git Bash on Windows aka MINGW aka MSYS
What is the expected behavior?
yarn runs
Please mention your node.js, yarn and operating system version.
12:57 $ node -v; yarn --version
v6.7.0
0.15.1
Windows 10
Also having the same issue on Windows 10 with v4.2.1 Node
Having the issue on Windows 7 with v6.7.0 Node
Duplicate of #743. Thanks for reporting this! Please follow that issue for updates.
Also having this issue on Windows 10 with v4.4.7 Node
Also having this issue on Windows 10 with v6.6.0 Node
Also having this issue on Windows 7 with v6.6.0 Node, v0.16.1 yarn
Arguments:
C:\Program Files\nodejs\node.exe D:\softs\yarn\bin\yarn.js init
Yarn version:
0.16.1
Node version:
6.6.0
Platform:
win32 x64
npm manifest:
No manifest
yarn manifest:
No manifest
bower manifest:
No manifest
Lockfile:
No lockfile
Trace:
Error: Can't answer a question unless a user TTY
at ConsoleReporter.question (D:\softs\yarn\lib\reporters\console\console-reporter.js:186:29)
at Object.<anonymous> (D:\softs\yarn\lib\cli\commands\init.js:95:34)
at next (native)
at step (D:\softs\yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
at D:\softs\yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:20
Also having this issue on Windows 10 with Node v7.1.0 and Yarn v0.16.0
Try adding the following to your .bashrc file:
alias yarn='node "C:\Program Files (x86)\Yarn\bin\yarn.js"'
Running yarn init should work now for Windows 7. Can somebody please confirm that this works on Windows 10?
Hi, @ScottyFillups ! Thank you so much for your advice.
Your alias works fine on Windows 10.
Most helpful comment
Also having this issue on Windows 10 with Node v7.1.0 and Yarn v0.16.0