NPM Demystified Part-1 : npm install explained in detail.

In the previous chapter, we managed to run node application with inbuilt node modules. This chapter we will include some more external node module into our application. Basically npm install explained in detail.

Before using external node modules, we need to install those node modules into our application.

☝☝Question: How can I install node modules in our application?Don’t Worry, It is very simple you need to use following command npm install <package_name>.

☝☝Question: Where I should search for external node modules?You can search for node modules in this URL https://www.npmjs.com/. There are multiple node modules available for the same purpose and you can use which one suits you well.

☝☝Question: Can I write my own node modules and able to push in to npm website?Yes, You can write your own node modules and you can push your node modules into npm website. So that other developer can use your code. We will see how to do it in the separate post.

Install external npm module:

Now I’m planning to install lodash modules. One of the popular module in node.

When you search lodash in the npm website, it will return multiple modules and we are going to use lodash. Let’s install it.

npm install lodash –save

It takes less than a minute for installation based on your network bandwidth.