DEV Community


Most useful npm command

A Full stack developer(7+ years experience), love to work on js, angular, nodejs, reactjs, nextjs, gatsby.
・1 min read

Below is the list of the most useful npm command.

  • 1. npm init: to generate the package.json file
  • 2. npm i or npm install: to install all packages of the package.json file
  • 3. npm i -g: install the package globally
  • 4. npm start: It will execute the entry point script you added in the package.json file
  • 5. npm install npm@latest -g: Upgrade the npm package to the latest version
  • 6. npm outdated: list of all out date packages
  • 7. npm list -g: list of all global npm packages
  • 8. npm uninstall "package name": it will uninstall the package
  • 9. npm publish: This is used to publish the package at npmjs

Your suggestion much appreciated

Discussion (0)