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


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? – Goran7777 Nov 27 '18 at 9:19
  • Thanks a lot,cant upvote because i am newbie and havent reputation. – Goran7777 Nov 27 '18 at 9:20
  • npm -g ls unique-string or npm -g v unique-string as well. – muru Nov 27 '18 at 9:22
  • That's nice to get verbose output. – karel Nov 27 '18 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. – Goran7777 Nov 27 '18 at 9:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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