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 run npm ls.

To list all globally installed modules, we run

npm -g ls --depth=0

And to list all locally installed modules in a folder, we run

npm ls --depth=0

in the project folder.

Conclusion

To print a list of all installed Node.js modules, we run 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 *