About a year ago I would find myself time to time asking my inner-developer, “What, npm packages do I have installed globally on my mac? And what version are they?”
Yes, I agree with you those were some sad times; ha!
Instead of asking the “oracle” (Google) how to find the answer each time, I’m going to provide the answer here; for my own convenience and maybe it will be useful for other ‘developers’.
Note: I’m using both OS X and Homebrew as my dev environments. If you want to learn how to install Homebrew the right way? You should read my awesome homebrew guide. And if you have more time I also, recommend you reading my node.js and npm guide as well.
npm list -g --depth=0
The output result should look something like this:
Note: Updated on September 08th, 2015.
Last login: Tue Sep 8 15:48:10 on ttys000 ➜ ~ npm list -g --depth=0 /usr/local/lib ├── firstname.lastname@example.org ├── email@example.com ├── firstname.lastname@example.org └── email@example.com