NPM is a javascript package manager for the Node JavaScript platform. The objective of this article is to install NPM on Red Hat Enterprise Linux 8. To install NPM on Rhel 8 we will use the dnf install command.

In this tutorial you will learn:
  • How to install NPM on Rhel 8.
  • How to search for modules using NPM.
  • How to install modules using NPM.
  • How to install modules form a Git repository.
Installing NPM on Redhat 8.
Installing NPM on Redhat 8.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Red Hat Enterprise Linux 8
Software npm 6.4.1 or higher
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - 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

How to install npm on RHEL 8 step by step instructions



  1. Use the dnf command to install npm package:
    # dnf install npm
    
  2. Check npm version to confirm the Npm installation:
    # npm --version
    6.4.1
    
  3. Install modules using the npm command.

    To search all available modules with NPM enter:
    $ npm search KEYWORD
    
    To perform a module installation with NPM run:
    $ npm install MODULE-NAME
    
    To 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://This email address is being protected from spambots. You need JavaScript enabled to view it.
    	/visionmedia/express.git
    OR with SHH access
    $ npm install git+ssh://This email address is being protected from spambots. You need JavaScript enabled to view it./visionmedia/express.git
    
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME or create a JOB ALERT on LinuxCareers.com job portal.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions