Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bash: npm: command not found

When I check the version of Node, it says

v8.0.0

but when I check the version of NPM, it says

bash: npm: command not found

Previously, my action was

npm install -g "@angular/cli"

That's when it consistently shows the npm: command not found message.

I tried searching for possible solutions but none worked like the brew and others.

like image 799
Char Avatar asked Jan 23 '26 05:01

Char


1 Answers

The npm file should be in /usr/local/bin/npm. If it's not there, install node.js again with the package on their website. This worked in my case.

like image 83
Mohammed Shereif Avatar answered Jan 25 '26 02:01

Mohammed Shereif