Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bash: npm: command not found in Debian 9.3

I am using Debian 9.3. (stretch) I cannot run "npm" commands.

Output for node -v

bash: node: command not found

Output for nodejs -v

v4.8.2

Output for npm -v

bash: npm: command not found

I'm a newbie on Debian and I can't understand what's happening.
- I already reinstall Node.js
- I already tried following the steps of the Official Page.
- I already ran apt-get install npm Output E: Unable to locate package npm.
- I was at Debian Testing and have the same error when I was there.

Thanks for read and help
- Melt

like image 291
Orlando Cartagena Avatar asked Feb 23 '18 07:02

Orlando Cartagena


People also ask

How do I fix npm not found?

The npm command not found error js server, which you can download from the nodejs.org website. Once you downloaded and installed Node. js, open the terminal and run the npm -v command. Once you see the npm version, you should be able to run the npm install command again.

Why npm install command is not working?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.


1 Answers

I had same problem with debian then I tried this and problem solved.

Run this is command

curl -L https://npmjs.org/install.sh | sudo sh

check version

npm -v

You should see this after doing these steps enter image description here

like image 159
TAHA SULTAN TEMURI Avatar answered Oct 12 '22 12:10

TAHA SULTAN TEMURI