DEV Community

loading...

Node.js: Listing currently installed NPM packages

RajeshKumarYadav.com
I am Rajesh, a Technology Specialist by profession and a Technical Blogger by passion. I am passionate about knowledge sharing, open-source contributions, connecting to people, and mentoring.
Updated on ・1 min read

To generate a list (tree view) of currently installed packages, use

npm list
Enter fullscreen mode Exit fullscreen mode

ls, la and ll are aliases of list command. la and ll commands shows extended information like description and repository.

Options

The response format can be changed by passing options.

npm list --json
Enter fullscreen mode Exit fullscreen mode
  • json - Shows information in json format
  • long - Shows extended information
  • parseable - Shows parseable list instead of tree
  • global - Shows globally installed packages
  • depth - Maximum display depth of dependency tree
  • dev/development - Shows devDependencies
  • prod/production - Shows dependencies

If you want, you can also go to the package's home page.

npm home <package name>
Enter fullscreen mode Exit fullscreen mode

Buy Me A Coffee

With all that being said, I highly recommend you keep learning!

Thank you for reading this article. Please feel free to connect with me on LinkedIn and Twitter.

Discussion (0)