How to check if the some needfull npm module is globally installed on my machine,and if so, what is the version ?

1 Answer 1


To check which modules of nodejs or node (snap package) are installed globally run this command:

npm -g ls  

To check if a node module (example unique-string module) is installed globally run this command:

npm -g ls | grep unique-string  


│ │ ├─┬ unique-string@1.0.0
  • This is for all globally installed npm modules which help me too,but, is there a way to check only targeted module? Nov 27, 2018 at 9:19
  • Thanks a lot,cant upvote because i am newbie and havent reputation. Nov 27, 2018 at 9:20
  • npm -g ls unique-string or npm -g v unique-string as well.
    – muru
    Nov 27, 2018 at 9:22
  • That's nice to get verbose output.
    – karel
    Nov 27, 2018 at 9:24
  • @muru Thank you too,i can only say thanks for now,cant upvote.@karel npm -g ls | grep unique-string method is exactly what i need. Nov 27, 2018 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.