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? – Goran_Ilic_Ilke Nov 27 '18 at 9:19
  • Thanks a lot,cant upvote because i am newbie and havent reputation. – Goran_Ilic_Ilke 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. – Goran_Ilic_Ilke Nov 27 '18 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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