npm

Gibson Joseph
YavarTechWorks
Published in
3 min readNov 29, 2022

Hi There, 👋

I am Gibson, in this blog, we will learn what is npm, how npm helps us and npm installation steps, and many other basic concepts. So without wasting time let’s start.

Table of Contents:

  1. package manager.
  2. how npm helps with managing packages.
  3. Installation step for npm.
  4. What is npm?
  5. npm help command.

Package Manager:

Now in this section, we will talk about what is a package manager.

  • When we have a problem to solve we end up writing the code to address that specific problem if we face the same problem later in a different project, then we can reuse that same piece of code.
  • So these individual files containing reusable code are called modules and a package is nothing but a directory with one or more modules along with a special file called package.json.

how npm helps with managing packages:

Now let’s understand how npm helps with managing these packages.

  • You write JavaScript code to solve a particular problem. And npm allows you to publish your code into the npm registry so the other developers who are facing the same problem can just reuse your code.
  • Whenever you make updates to your code npm makes it easy for developers who are dependent on your code to check for those updates and download them.

What is npm?

  • npm is the package manager for JavaScript.
  • So that is basically what npm is. It is a way to share your code with other developers and reuse the code from other developers and easily manage the different versions of your code.

Installation step for npm:

npm is free to use.

  • npm is shipped with node.js so in order to have it on their machines we just need to download and install node.js
  • Once you install the node open the command prompt and type “node -v” and this is going to give the version of the node installed on your system. now I have “19.0.0” but make sure you have the latest version when you install it.
  • And now that we have node installed we can run “npm -v” and this is going to give us the version of npm on our machines. now I have “8.19.2” but make sure you have the latest version when you install it.

npm Help:

Using help with npm is very simple just type “npm help” to get help npm.

syntax:

npm help

Now, this is going to the usage of npm. So it is npm followed by a command name.

npm <commandName>

All right. And with this, we finish the npm introduction.

We haven’t covered all npm concepts yet, we will learn more about npm in an upcoming blog.

Conclusion:

I hope this blog would be helpful to you, we have learned a lot of fundamental things about npm. Please like and share and encourage me to share more useful information with you. Hope to see you all in my next blog, Until then Take Care! Keep Learning!

Thank You For Reading this Blog………

Have a Nice Day……

👋👋👋

--

--

Gibson Joseph
Gibson Joseph

Written by Gibson Joseph

Web developer | current learn front-end | Daily improving skills | Tech Blogger | I share my Knowledge related to web development |