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?

Gulshan Saini

Fullstack Developer

Subscribe to our newsletter!

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

Related Posts

(Solved) Unexpected end of JSON input while parsing near '...'?

August 20, 2020
1 min
© 2020, All Rights Reserved.

Quick Links

Advertise with usContact Us

Social Media