How To Install Npm On Ubuntu
Node.js is a free and server-side platform for JavaScript runtime environment ready up on Chrome (V8) JavaScript Engine. The Node.js environment is developed to build back-end solutions and be famous for networking applications, full-stack, and front-finish development.
The "npm (Node Bundle Manager)" is used to install multiple node packages and dependencies. Nearly all the node packages are available on the world's largest parcel manager registry.
We have multiple resources to download the Node.js and npm on Ubuntu xx.04, but why non select the effortless ways.
In this guide, we will see the two approaches for installation:
- Install Node.js and npm from Ubuntu Official Repository
- Install Node.js Using nvm
Let's begin:
How to Install Node.js and npm from Ubuntu Official Repository
To download Node.js and npm from Ubuntu'due south repository is a pretty straightforward and simplest way. What we need to do is, open the terminal and update all the package index of the Ubuntu organization:
Run the post-obit control to install the Node.js environment with all the necessary packages on Ubuntu machine:
Once washed, verify if the installation has achieved by checking its version:
Through the Ubuntu official repository, the installed node.js is the latest bachelor bundle. It is not compulsory to get with it; if yous want to install the specific i, so move towards the 2nd approach in this guide.
To install the npm library on the system is as simple equally we have installed the node.js. Write the given command to initiate the installation process of the npm in the command line:
The Node.js and the npm library have been installed on the system from the Ubuntu official repository.
How to Install Node.js using nvm
In the above section, nosotros have seen that through the Ubuntu repository, only the latest bachelor package of Node.js can be installed. To go the specific version of Node.js on a organisation, download information technology through nvm that is the abbreviated course of "Node Version Manager". Every bit the name describes, it is the bash script consist of all node versions and allows the user to install and test any Node.js version as per requirement.
To go the download link, you can visit https://github.com/nvm-sh/nvm#installing-and-updating, or you can copy the mentioned whorl control in the terminal:
$ curl –o- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh" >https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh</a> | bash
You might face this issue, and to resolve this, install the curl command:
At present, run the above curl command of node.js again to begin nvm installation:
To source the bash file, run the given command:
Run the mentioned command to evidence the list of Node.js available versions:
Utilise the following syntax to install the version you want:
$ nvm install [version_number]
For instance, to install the node version "v10.24.1", the control would be:
To check the list of all node versions installed on Ubuntu auto, the command is:
How to Uninstall Node.js from Ubuntu xx.04
If you lot desire to uninstall the Node.js from the system, utilize the mentioned control:
Conclusion
This write-up shows how to install Node.js and npm on Ubuntu twenty.04 using Ubuntu repository and nvm methods.
Node.js is an open-source networking and server-side platform used to build JavaScript runtime applications. The npm is a package manager for all the available versions of Node.js, while the nvm manager is used to download a specific version.
Source: https://linuxhint.com/install-node-js-npm-ubuntu-s20-04/
Posted by: knoxmersed70.blogspot.com

0 Response to "How To Install Npm On Ubuntu"
Post a Comment