NPM – Node Package Manager

NPM – Use to stand for Node Package Manager, but not currently.

  1. NPM is an online repository where all the 3rd party packages are loaded
  2. It is a command line utility, where it reads package.json file and download all the dependencies required for that project.
  3. NPM is managed by a company called NPM INC
  4. packae.json is a setting file of npm that helps you configure and setup the project

Check is npm is using below command :

npm -v

Initialize a NPM project :

npm init

Now package.json file is created, which will be contain all the dependency, packae.json is a setting file of npm that helps you configure and setup the project

It will look like below :

Using “npm run start” command you can execute the command “node index.js” and “npm start” is the short hand for “npm run start”

Download a dependency into your project and add it into package.json

npm install <package_name>
Example : 
npm install moment
  • Once the command is executed successfully
  • The entry of this js will go inside package.json inside “dependencies” section

Read Me :

Package.json : https://docs.npmjs.com/cli/v6/configuring-npm/package-json

Leave a Comment