javascript: Useful commands

  1. Check npm help
    npm help <term>
  2. Check npm version
    npm -v
  3. List all packages installed Globally
    npm -g list
  4. List all packages installed for user
    npm list
  5. Check for the specific package Globally
    npm list -g grunt
  6. Check for the specific package for user
    npm list grunt
  7. Check versions of all installed modules without dependencies
    npm list –depth=0 (for locally)
    npm list -g –depth=0 (globally)
  8. Install a package globally
    npm install -g chromedriver (Remove -g to install locally)
  9. Update all packages in current folder
    npm update
  10. To see which global packages need to be updated globally
    npm outdated -g –depth=0
  11. update a particular package
    npm update -g

Leave a Reply