Installing Node.js and NPM on Ubuntu
Ubuntuto Node.js And NPM Installation is a simple process. First of all, Node.js's package archive (PPA) we must install. UbuntuIt is an old version from 's own package archive. For this curl We need . If it is not installed, type the following code into the terminal.
sudo apt-get update sudo apt-get install curl
PPATo add , type the following code into the terminal.
curl -sL https://deb.nodesource.com/setup | sudo bash -
PPA Once added, we can begin the installation.
sudo apt-get install nodejs sudo apt-get install build-essential
Alternative Method
If you have trouble with this installation, NPM from the package manager global If the programs you installed do not work or if you want to use more than one version at the same time, you can try the other method I used.
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
That's it. From now on nvm install “version number” You can install and use any version of Node.js you want.