What is npm and the explanation

Posted on

This is an article which is going to describe about what is npm and another several additional explanations on the npm itself.

What is npm ?

It is told that npm stands for Node Package Manager. In this context, npm is actually one of its function is a tool for Javascript developers for managing Javascript libraries, assets, frameworks. Some other claims that npm is a dependency manager for packages needed by a certain web application project. It is considered as the default package manager for Javascript runtime environment Node.js.

How to use npm ?

To be able to use npm, a command line interface is definitely needed. A CLI (Command Line Interface) is actually an interface for executing command in the command line or bash prompt such as a terminal. So, the command itself is typed into a bash prompt in a command line interface’s environment. But first of all, make sure that npm is already installed.

How to install npm ?

Installing npm is a necessary before it can be used. To be able to use npm, the installation process generally done by executing the installation command in the command line or in the bash prompt using any available software package manager such as yum, apt, deb, zypper or any other software package manager available exist in the associated operating system.

After successfully installing npm, don’t forget to type ‘npm’ in the command line as shown below :

root@hostname:~# npm 
Usage: npm 
where  is one of:
    access, add-user, adduser, apihelp, author, bin, bugs, c,
    cache, completion, config, ddp, dedupe, deprecate, dist-tag,
    dist-tags, docs, edit, explore, faq, find, find-dupes, get,
    help, help-search, home, i, info, init, install,
    install-test, issues, it, la, link, list, ll, ln, login,
    logout, ls, outdated, owner, pack, ping, prefix, prune,
    publish, r, rb, rebuild, remove, repo, restart, rm, root,
    run-script, s, se, search, set, show, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unlink, unpublish, unstar, up, update, upgrade, v, verison,
    version, view, whoami
npm  -h     quick help on 
npm -l           display full usage info
npm faq          commonly asked questions
npm help   search for help on 
npm help npm     involved overview
Specify configs in the ini-formatted file:
    /root/.npmrc
or on the command line via: npm  --key value
Config info can be viewed via: npm help config
[email protected] /usr/share/npm
root@hostname:~# 

If it is exist, the following command can also be used to find out the location of npm :

root@hostname:~# which npm
/usr/bin/npm
You have new mail in /var/mail/root
root@hostname:~#

One thought on “What is npm and the explanation

Leave a Reply