Yarn: I'm using nvm, cannot install yarn via homebrew

Created on 8 Apr 2017  路  5Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

bug

What is the current behavior?

  • I use nvm, and the node version is v6.10.0 in current terminal

I'm installing yarn via homebrew, but receiving this error:

Error: You mustbrew link nodebefore yarn can be installed

If the current behavior is a bug, please provide the steps to reproduce.

brew install yarn

What is the expected behavior?

It should normally install yarn without error...

Please mention your node.js, yarn and operating system version.

  • nvm 0.33.0
  • node v6.10.0
  • yarn latest version
  • operating system mac OS Sierra 10.12.1

Most helpful comment

brew install yarn works if you did brew install node. If you're using nvm, I'm pretty sure you can just install with npm install -g yarn as mentioned in the install docs.

All 5 comments

brew install yarn works if you did brew install node. If you're using nvm, I'm pretty sure you can just install with npm install -g yarn as mentioned in the install docs.

@gibfahn but install docs do not recommend installing yarn through npm. and yarn hasn't been updated on npm for a while ... can you explain this?

@binarykitchen afraid not, I haven't worked on yarn, I just happened to see this issue.

Your issue https://github.com/yarnpkg/yarn/issues/3255 seems to cover the issue adequately.

yep ... wait see what will happen on that issue

I know this is closed but i did a brew uninstall yarn and then the suggested npm install yarn -g from @gibfahn followed by yarn global upgrade yarn per docs (well i had to sudo it 馃槵 ) and it seems to have worked great!

yarn global v0.27.5
warning package.json: No license field
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
success Saved lockfile.
success Saved 1 new dependency.
鈹斺攢 [email protected]
warning No license field
Done in 3.58s.
Was this page helpful?
0 / 5 - 0 ratings