What is npm?

“Node Package Manager” is called npm in shortened form. npm is a packet manager for JavaScript programming language. npm is free to use and users can download it from npm public software packages.

npm contains;

  • The website : Use to discover packages , set up profiles and manage other npm user experiences.
  • The CLI : CLI runs from a terminal and npm is interacted with by the developers.
  • The registry : Public and large JavaScript database and contains meta information related to it.

Here are some commands in npm:

  • To install npm (in Windows)- C:\>npm install <package_name>
  • To check your npm version- C:/>npm -v
  • To install express package — C:/>npm install express
  • To install a package as a development dependency — C:/>npm install <package_name>- -save-dev
  • To install a package globally — C:/>npm install <package_name>- -global

Let’s consider some uses of npm. npm use to adapt packages of code for applications. It allows you to share code with any npm user anywhere. And it is possible to download standalone tools that developers can use directly. Also, npm is able to manage various versions of code and their dependencies. Further, it helps developers to find other developers who are working on same domain projects and problems.

--

--