Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 811
TJB Avatar asked Oct 17 '25 09:10

TJB


1 Answers

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!!

like image 56
Sk Arif Avatar answered Oct 18 '25 23:10

Sk Arif



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!