# Pastebin tCoUPPyo Here are the step by step ways I solved this issue. I used 'brew' to install node and ran into this issue exactly: the node command worked but not the npm command sudo brew uninstall node brew update brew upgrade brew cleanup brew install node sudo chown -R myusername /usr/local brew link --overwrite node sudo brew postinstall node I pieced together this solution after trial and error using this thread and this site: http://developpeers.com/blogs/fix-for-homebrew-permission-denied-issues