How to install node8 on mac osx
- READ THIS: https://github.com/brock/node-reinstall
At an absolute minimum, you need to go into the home directories (the ones that start with ~/) and make sure you are okay with deleting the contents of those directories. If you are unsure if this will delete anything important, you should stop now and find another alternative for re-installing Node.js, because this approach is pretty destructive.
rm -rf ~/local rm -rf ~/lib rm -rf ~/include rm -rf ~/node* rm -rf ~/npm rm -rf ~/.npm* sudo rm -rf /usr/local/lib/node* sudo rm -rf /usr/local/include/node* sudo rm -rf /usr/local/bin/node sudo rm -rf /usr/local/bin/npm sudo rm -rf /usr/local/share/man/man1/node.1 sudo rm -rf /usr/local/lib/dtrace/node.d
First part to delete - https://gist.github.com/DanHerbert/9520689
rm -rf /usr/local/lib/node_modules brew uninstall node
then to install - https://gist.github.com/DanHerbert/9520689#gistcomment-2129349
brew install node npm install npm --global