Install Node.js and npm using Node Version Manager NVM
Open a terminal and run this NVM node version manager installation script.
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Or you can install with cURL
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
In this script, v0.35.3 is the nvm version number. You can change this based on this Latest nvm version.
Close the terminal and reopen it. Run this to verify the nvm installation.
Install Node.js and npm.
Recommended Reading: ScreenCloud Screenshot Taking and Sharing Tool-How to Install ScreenCloud on Ubuntu
You can run this command to install the latest version of Node.js.
nvm install node
If you want to install a specific node.js version, first use this command to find the available Node version.
Then, if you want to install v12.16.2, use this command to install.
nvm install 12.16.2
List the installed node versions. Close the terminal, then open it and run it.
You can run this command to set the default Node.js version. Enter the version number below the command.
nvm use v12.16.2
You can check the default version with this command.
You can use this command to uninstall a specific version of node.js. You are now uninstalling v13.13.0 from your system.
nvm uninstall v13.13.0
npm comes with node.js. Downloading and installing Node.js will automatically install npm on your system. You can use this command to see the installed npm version.
It’s the kind of thing