Do you want to request a _feature_ or report a _bug_?
bug
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
install yarn
open cygwin
yarn --verison
Error: Cannot find module 'E:\cygdrive\d\tools\yarn\bin\yarn'
What is the expected behavior?
got the right version of yarn
Please mention your node.js, yarn and operating system version.
node.js 4.6.7, win7, in cygwin
Which installation method did you use to install Yarn?
I'm experiencing the same problem. In my case, I use the .msi provided on https://yarnpkg.com/en/docs/install. Yarn works fine under cmd.exe.
Replacing the yarn file content into the bin folder by:
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
node "$basedir/yarn.js" "$@"
ret=$?
exit $ret
did the trick for me.
@Daniel15 I use I use the .msi provided on https://yarnpkg.com/en/docs/install
Good catch... yarn should probably be a shell script that handles Cygwin.
@Daniel15 I just use alias yarn=yarn.cmd to work it around.
@gensmusic Thanks for pointing me in the right direction! This pull request should fix it: #1180
Most helpful comment
@Daniel15 I just use
alias yarn=yarn.cmdto work it around.