NPM command not found

I just updated node (via the nodejs.org package installer) and now npm will not work.

npm: command not found

Any idea what is going on?

+7
source share
2 answers

I hung up too. I installed node via nvm and could not start npm or node. I had to run nvm use 0.10.10

then which node and which npm worked again.

if you installed npm via nvm , you can add nvm use <version> to your .bashrc so that you always have access to npm on any open shell. You just need to remember that you need to update it every time you upgrade npm or use stable .

+5
source

This may be a resolution issue. If so, you need to run this: sudo chown -R $ USER / usr / local

It worked for me

+3
source

All Articles