Debian – How to install NPM on Debian

debiandebian-stretchinstallationnpm

Can somebody please help with installing NPM in Debian?

First I tried apt-get install npm but got this message:

Unable to locate package npm.

So I followed the installation steps for Debian from nodejs.org. The first command:

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

gave this message:

sudo command not found.

But if I install packages do not have to write sudo so I deleted it and got this message:

-E command not found

Any hints?

Best Answer

If you don't have sudo installed, then your command string should be this instead:

curl -sL https://deb.nodesource.com/setup_9.x | bash -
apt-get install -y nodejs
Related Topic