HomeTutorsContact

How to list the installed node modules and their dependencies?

By Gulshan Saini
Published in NodeJS
August 15, 2020
1 min read

Like on a *nix system, ls is short for the list, and that’s what it does: lists the installed modules.

List local packages

To find out what modules are installed in your project, you can issue this command:

npm ls

ls command will also list the dependencies of packages installed by the project.

List global packages

To list global packages add the flag -g before ls command

npm -g ls

This will display the packages installed in the global cache.

Show only top-level packages

To display only top-level packages, you can add the flag --depth=0 to ls command

npm ls --depth=0


Tags

#nodejs#npm
Previous Article
How to enable or disable experimental web platform features in chrome browser?

Related Posts

NodeJS
Understanding the Event Loop: How Node.js Executes Asynchronous Callbacks
January 04, 2023
5 min
Gulshan Saini

Gulshan Saini

Fullstack Developer

Topics

JavaScript
Angular
ReactJS
Typescript
Linux

Subscribe to our newsletter!

We'll send you the best of our blog just once a month. We promise.

Quick Links

Contact UsBrowserCSSPythonPuppeteer

Social Media