Skip to content
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 got error in cygwin Error: Cannot find module 'E:\cygdrive\d\tools\yarn\bin\yarn' #819

Closed
gensmusic opened this issue Oct 12, 2016 · 7 comments

Comments

@gensmusic
Copy link

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

@Daniel15
Copy link
Member

Which installation method did you use to install Yarn?

@tomzx
Copy link

tomzx commented Oct 12, 2016

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.

@jbe456
Copy link

jbe456 commented Oct 14, 2016

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.

@gensmusic
Copy link
Author

@Daniel15 I use I use the .msi provided on https://yarnpkg.com/en/docs/install

@Daniel15
Copy link
Member

Good catch... yarn should probably be a shell script that handles Cygwin.

@gensmusic
Copy link
Author

@Daniel15 I just use alias yarn=yarn.cmd to work it around.

Daniel15 added a commit to Daniel15/yarn that referenced this issue Oct 18, 2016
Daniel15 added a commit to Daniel15/yarn that referenced this issue Oct 18, 2016
Daniel15 added a commit to Daniel15/yarn that referenced this issue Oct 18, 2016
Daniel15 added a commit to Daniel15/yarn that referenced this issue Oct 18, 2016
@Daniel15
Copy link
Member

@gensmusic Thanks for pointing me in the right direction! This pull request should fix it: #1180

bestander pushed a commit that referenced this issue Oct 18, 2016
@wyze wyze removed the needs triage label Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants