Categories
JavaScript Answers

How to fix error when running brew install node on Mac?

Spread the love

To fix error when running brew install node on Mac, we set a few folders’ owners to the current user.

To do this, we run

sudo chown -R `whoami`:admin /usr/local/include/node
sudo chown -R `whoami`:admin /usr/local/bin
sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/lib/dtrace 

to set the owner of the /usr/local/include/node, /usr/local/bin, /usr/local/share, and /usr/local/lib/dtrace folders to the current user.

Then we overwrite node with

brew link --overwrite node

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *