Disclaimer: I am a consultant at Amazon Web Services, and this is my personal blog. The opinions expressed here are solely mine and do not reflect the views of Amazon Web Services (AWS). Any statements made should not be considered official endorsements or statements by AWS.
This post will show you – how can you get a list of all node modules installed globally & locally on your machine.
You can use the below commands to get a list of all node modules installed globally on your machine.
OR
There are also a few aliases for list and they are ls, la & ll. It means you can also write the above commands in the below ways.
npm ls -g --depth 0npm la -g --depth 0npm ll -g --depth 0When you run commands using ll or la – It will show some extra information by default.
Important Note:
npm list -g --depth 0command is faster thannpm list -g. Reason being,npm list -g --depth 0doesn’t care about further node-module dependencies & display result as a flat list. On the other hand,npm list -gcommand looks for further module dependencies & displays the result in a tree structure format.
All the commands will remain the same in this case except the below two things:
-g from the above commands, as -g refers to global.That's all...Thanks...:)