I just came back to work on a React project after working in the Rails environment and found that I cannot run any NPM commands in my Mac terminal. I\'ve tried all the remedies
This happened to me after installing yarn.
in a terminal:
brew uninstall --force --ignore-dependencies node
brew install node
if you have trouble symlinking node, in the same terminal:
sudo chown -R `whoami`:admin /usr/local/include
sudo chown -R `whoami`:admin /usr/local/bin
sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/lib
brew link --overwrite node
Check that your re-installation worked by typing the following in the terminal:
node -v