Timothy Joseph Baney Timothy Joseph Baney - 7 months ago 15
Bash Question

Node installed, but not NPM

I installed node with brew 'brew install node', and I get a warning message

'Warning: The post-install step did not complete successfully'.


When I put in node -v, I can indeed see the current version of node, however when I try to find the current version of npm, I get this error.

-bash: /usr/local/bin/npm: No such file or directory


Is the reason that NPM does not exist because the post-install step did not complete successfully ?

Answer

Yup, that thing happened to me too. After a lot of searching I came to a solution. I think this would help you.

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

Thanks!!