Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript npm Basics (retiring) Updating and Uninstalling Packages with npm Uninstalling Packages with npm

How can we view a list of all global dependencies installed?

Since we can't see these in our folder structure, is there a command to see which are installed in a list format?

1 Answer

I answered my own question with a little google search. You can use npm list -g --depth=0

You can change the depth to any number desired. Using --depth=0 will show only the main dependency.

Additionally, by removing -g it will show all of the depencies that are local, but not the global dependencies.

I hope this helps for anyone with the same question. If there is a moderator, or anyone with more knowledge on this topic, please feel free to add to this post, in case I've missed any important info.