Installing npm in NodeJs

NPM is node package manager for NodeJs, which is written fully in JavaScript. NPM runs on terminal or command line and manages dependencies if needed, when author include on the package.

npm-logo

npm logo

To install package just run the below command in terminal or command line.

npm install request

Command will install request package in NodeJs, also you can find lots package manager in https://www.npmjs.org/

  • hayesmaker

    how do you run npm command before npm is installed? and isn’t npm installed by installing node?

    • http://www.codeasearch.com web help

      npm command tool will come along with nodejs, if you have installed nodejs already. then you can run npm command.

      No need to install npm command separately.

    • http://www.codeasearch.com codeasearch

      npm command tool will come along with nodejs, if you have installed nodejs already. then you can run npm command.

      No need to install npm command separately.

  • Chris Dopuch

    This tutorial is innacurate, the command npm install request will install the request package: https://www.npmjs.com/package/request
    If you install NodeJS you don’t need to install npm. The command to update npm to the latest version is this: npm install -g npm

    • http://www.codeasearch.com codeasearch

      Hi Chris,

      Thanks for your response, this tutorial is about installing package in nodejs using npm. It’s not about installing npm.

      Once again thanks for your valuable comments.