Objective
The objective of this article is to install NPM on Ubuntu 18.04 Bionic Beaver. NPM is the package manager for JavaScript.Operating System and Software Versions
- Operating System: - Ubuntu 18.04 Bionic Beaver
- Software: - 3.5.2 or higher
Requirements
Privileged access to your Ubuntu System as root or viasudo
command is required. Difficulty
EASYConventions
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
sudo
command - $ - requires given linux commands to be executed as a regular non-privileged user
Instructions
Install NPM on Ubuntu
The following linux command will install NPM on the Ubuntu 18.04 system. It is also recommended to install NPM alongside with thebuild-essential
package in case that NPM encounters a source package during module installations: $ sudo apt install npm build-essentialCheck for NPM version:
$ npm --version 3.5.2
Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
Use NPM to install JavaScript module
To search all available modules with NPM enter:$ npm search KEYWORDTo perform a module installation with NPM run:
$ npm install MODULE-NAMETo install a JavaScript module directly from GIT repository execute NPM with the URL of the actual module you wish to install.
For example the bellow command will install the
express
module from its home git repository: $ npm install git+https://git@github.com/visionmedia/express.git OR with SHH access $ npm install git+ssh://git@github.com/visionmedia/express.git