Open In App

How to install an npm package directly from GitHub ?

Improve
Improve
Like Article
Like
Save
Share
Report

NPM (Node Package Manager) is the default package manager for Node.js and is written entirely in Javascript. Developed by Isaac Z. Schlueter, it was initially released on January 12, 2010. NPM manages all the packages and modules for Node.js and consists of command-line client npm. It gets installed into the system with the installation of Node.js. The required packages and modules in the Node project are installed using NPM.
A package contains all the files needed for a module and modules are the JavaScript libraries that can be included in the Node project according to the requirement of the project.

To install a NPM Package directly from GitHub, we need to follow the following steps:

  1. Go to the package’s GitHub Repository https://github.com/expressjs/express.

  2. Copy the cloning link.

    Express.js Github

  3. Go to your terminal or git bash and type: 

    npm install git+{copied_url} 
  4. Example: Run the below command in you terminal to install an npm package directly from GitHub.

    npm install git+https://github.com/expressjs/express.git


    Last Updated : 05 Oct, 2021
    Like Article
    Save Article
    Previous
    Next
    Share your thoughts in the comments
Similar Reads