To fix Node already installed but not linked issue on Mac, we change the permission of a few folders and run brew link
.
To fix this, we
-
Run
sudo chmod 776 /usr/local/lib
to change the permission of the /usr/local/lib to make the folder readable, writable and executable. -
Run
brew link --overwrite node
to link Node. -
Run
sudo chmod 755 /usr/local/lib
to change the directory to be readable and executable.