npm package manager in node

NPM is a package manager for Node.js https://www.npmjs.com/ is the official website of NPM. We can use NPM to do below things.
  • List Node.js packages
  • Search Node.js packages
  • Uninstall Node.js packages
  • Update Node.js packages
NPM uses package.json file to manage the packages dependencies. Below command will list all downloaded packages.
 
npm ls

To install any package, you have to use below command.
 
npm install <package-name>
npm install selenium-webdriver

Use below commands to set up node.js project locally.
 
npm init

package.json file contains all project information like main module file, name of the module, project url, authors etc. If you are behind the proxy, you will need to configure the proxy server as shown in below command.
 
npm config set proxy https://user:[email protected]:proxyport

Complex problems, Simple Solutions