I need some help and clarification regarding Yarn installation process.
MacOS ver. 10.14.2
- I've installed
Homebrew
via official site (ver. 2.0.1
). - I've installed
NPM
by downloading package from official site (ver. 10.15.1 LTS
). - Now when I tried to install
yarn
viabrew install yarn
I have the following error:
The post-install step did not complete successfully
You can try again using `brew postinstall node`
As I undertand, NPM installs node locally, when, for instance, I try to use create-react-app
. When I use Homebrew to install yarn
, it tries to install node
globally. And we have conflict here.
I've found suggestion to use:
sudo chown -R `whoami`:admin /usr/local/
I am not entirely sure what this command does.
So, the questions are:
- Why changing the owner of the folder should be a solution? How will it affect multi user system?
- What is the correct way to install yarn?
- Can be there any conflicts if node is installed globally and locally (app folder.)
P.S. Please correct me, if I have wrong understanding here.