Search code examples
node.jshomebrewyarnpkg

installing yarn with brew


First using brew, I installed current node LTS which is node@14 right now

Then I symlinked node using brew link --force node@14 since LTS versions are keg-only

Then I installed yarn with brew install yarn but for some reason brew installed node@15 and after that installed yarn. brew list result shows node and node@14, the former appeared after installing yarn. Now my current node version shows node@15.

I want to use node LTS version and would also like yarn use that version. How do I do it?


Solution

  • Creating a directory and linking desired version of node to that directory and installing yarn with --ignore-dependencies solved my problem

    source: here