Categories
JavaScript Answers

How to print a list of all installed Node.js modules?

Spread the love

Sometimes, we want to print a list of all installed Node.js modules.

In this article, we’ll look at how to print a list of all installed Node.js modules.

How to print a list of all installed Node.js modules?

To print a list of all installed Node.js modules, we can use npm ls.

For instance, we run

npm -g ls --depth=0

to print all the installed global packages.

And we run

npm ls --depth=0

to print all the installed local packages in a folder.

Conclusion

To print a list of all installed Node.js modules, we can use npm ls.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *