BRAHMA TECHNOLAB

Reading Time: 2 minutes

Node Package Manager

What is Npm ?

  1. Npm is the world’s largest Software Library (Registry).
  2. Npm is also a Software Package Manager and Installer.

World’s Largest Software
Registry (Library)

  1. Npm is the world’s largest Software Registry.
  2. The Registry contains over 800,000 code packages.
  3. Open-source developers use Npm to share Software.
  4. Many Organizations also use npm to manage private development.

Npm Is Free

Npm is free to use.

You can Download all Npm public software packages without any registration or login.

Command Line Client

Npm includes a CLI (command line client) That can be used to download and install software:

Installing npm

Npm is installed with Node.js

This means that you have to install Node.js to get npm installed on your computer.

Download Node.js from the official Node.js web site https://nodejs.org

Software Package Manager

The name npm (Node Package Manager) stems from when npm first was created as a package manager for Node.js

All npm package are defined in files called package.json.

The content of package.json must be written in JSON.

At least two fields must be present in the definition file: name and version

Managing Dependencies

Npm can manage dependencies

Npm can (in one command line) install all the dependencies of a project.

Dependencies are also defined in package.json.

Sharing Your Software

If you want to share your own software in the Npm registry, you can sign in at:

https://www.npmjs.com

Publishing a Package

You can publish any directory from your computer as long as the directory has a package.json file.

Check if Npm is installed:

Check if you are logged in:

If not, log in:

Navigate to your project and publish your project:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.