Install Node.js 10.15.1 LTS on Debian 9 Stretch

If you’re a Noob and wondering how to install Node.js on Debian or Ubuntu, just like me..

Well, let me tell you, you’re in a right place. Of course you can install Node.js by using command apt install but the version of Node.js you might get would not satisfy you. Sometimes you’d get older version of Node.js, or in some case you might need a certain version of Node.js.

So, any better way?

Yes.. go visit this page 🙂

https://github.com/nodesource/distributions/blob/master/README.md

Take a look on this section

Node.js v10.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

Last thing you might check from console by typing node -v to get the version of Node.js installed.